Search and Top Navigation
#5734 closed bug (notabug)
Opened June 17, 2010 12:56AM UTC
Closed October 17, 2012 06:14AM UTC
The altField is not updated when a null date is specified
Reported by: | russell | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.11.0 |
Component: | ui.datepicker | Version: | 1.8.2 |
Keywords: | futurescott | Cc: | |
Blocked by: | Blocking: |
Description
Setup a datepicker with an altField & altFormat. Then empty the date field and tab out. The altField is not updated.
Attachments (0)
Change History (6)
Changed June 17, 2010 01:14AM UTC by comment:1
Changed January 28, 2011 11:09AM UTC by comment:2
_comment0: | Replying to [comment:1 russell]: \ Hello, \ can you post more detailed solving code? because I don't understand where I need to insert this function. \ \ > to get around the problem I had to do this : \ > \ > {{{ \ > onClose: function(dateText, inst) { \ > if(dateText == '') { \ > $(inst.settings["altField"]).val(dateText); \ > } \ > } \ > \ > }}} \ → 1296213431723685 |
---|
Replying to [comment:1 russell]:
Hello,
can you post more detailed solving code? because I don't understand where I need to insert this function.
And there is one more question: what about situation when user close datepicker dialog and then clear input field by keyboard?
to get around the problem I had to do this :> onClose: function(dateText, inst) { > if(dateText == '') { > $(inst.settings["altField"]).val(dateText); > } > } > >
Changed January 30, 2011 01:50AM UTC by comment:3
I used this code snippet in initialization, I don't have an actual fix.
Changed October 11, 2012 09:04PM UTC by comment:4
milestone: | TBD → 1.11.0 |
---|
Changed October 17, 2012 06:01AM UTC by comment:5
This might help: http://jsfiddle.net/nick_craver/fyv33/11/
Changed October 17, 2012 06:14AM UTC by comment:6
keywords: | → futurescott |
---|---|
resolution: | → notabug |
status: | new → closed |
Thanks for contributing! This is not really a bug but a feature. altField does not update when an invalid date is present. This API is being redesigned in the future. Ask future scott about if you're curious!
to get around the problem I had to do this :