KB Article 15995
2019/01/31

Close
X
Contact Tech Support

 Email Tech Support
 (250) 655-1766
 [7:30 - 5:00 PST]
Your Meeting ID will be Provided by a Rep.
Tech Support
Tech Support Home
Software Updates
Knowledge Base Search
Recent KB Articles
Product FAQs
Code Samples
Documentation
Tech Blog
System Requirements
Installation Instructions
Support Testimonials
Contact us to...
Create a Ticket
Request a Free Demo
Suggest a New Feature
Submit Feedback
Upload a Large File
Other Services
Software Training
Professional Services

Hide/show date picker field

Product: Presto Type: How to

Let's say you added a datepicker to your page and attached a special class for it.

Now, if for some reason you would like to hide this datepicker programmatically, the simple command jQuery('.myDatepicker').hide(); will not work as expected. The reason for it is that jQuery('.myDatepicker') refers to a span that is wrapping datepicker itself (the input field) along with a calendar button.

 

In order to hide datepicker you should assign a new class run the following command:

jQuery('.myDatepicker').children().hide();

Similarly, if you want to bring it back from hiding run this command:

jQuery('.myDatepicker').children().show();

 

Keywords: date picker, datepicker, hide, show, span

Rate This Article

Did this example help you to achieve your goal?
 Yes  No  Don't Know

Enter additional comments below.   If you want to hear back from us, include your contact information.

Email Address:
Comments:
Please enable JavaScript in order to rate this page.