Opened 13 years ago

Closed 11 years ago

#5734 closed bug (notabug)

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.

Change History (6)

comment:1 Changed 13 years ago by russell

to get around the problem I had to do this :

    onClose: function(dateText, inst) {
      if(dateText == '') {
        $(inst.settings["altField"]).val(dateText);
      }
    }

comment:2 in reply to:  1 Changed 12 years ago by 17dufa

Replying to 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);
      }
    }

Version 0, edited 12 years ago by 17dufa (next)

comment:3 Changed 12 years ago by russell

I used this code snippet in initialization, I don't have an actual fix.

comment:4 Changed 11 years ago by Scott González

Milestone: TBD1.11.0

comment:6 Changed 11 years ago by mikesherov

Keywords: futurescott added
Resolution: notabug
Status: newclosed

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!

Note: See TracTickets for help on using tickets.