Solved

Jquery Datepicker

Posted on 2015-02-07
2
65 Views
Last Modified: 2015-02-08
If I use the Jquery datepicker & I select a date, there seems to be no way to just erase the text field I connect to the picker.

In my application, I need that ability.

Is there a property or ?? that will allow that.

Thanks
0
Comment
Question by:Richard Korts
2 Comments
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 500 total points
ID: 40596606
Hi,
unfortunately there is no public interface on the datepicker to clear the text field, but there is an internal private function which clears the textfield: _clearDate

You have two options:
either you extend the datepicker plugin so that you have an additional button in the datepicker toolbar. A good implementation and how-to can be found here:
http://mazzimo-in-london-eng.blogspot.de/2013/03/add-clear-button-or-whatever-you-want.html

or you create a button beside the text field which will call that function:
http://jsfiddle.net/EE_RainerJ/0h5nd8hx/

HTH
Rainer
0
 

Author Closing Comment

by:Richard Korts
ID: 40597264
OK, http://jsfiddle.net/EE_RainerJ/0h5nd8hx/ works, but when it clears it tries to submit the form???

I'll issue another question in Jquery.

Thanks
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How do you setTimeout in JQuery? 1 28
ajaxSubmit is giving me an error 1 47
Jquery keyup 4 25
How can i  prevent default  Submision? 6 34
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question