Solved

Jquery Datepicker

Posted on 2015-02-07
2
66 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Alert after MVC form submitted 1 29
Binding a Grid in Javascript 5 57
JavaScript Sort Ordering and Choice Limiting 5 38
modify change color of text 9 37
Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
The viewer will learn how to dynamically set the form action using jQuery.
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)

726 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