Opened 8 years ago

Closed 8 years ago

#7609 closed bug (notabug)

datepicker doesn't retain year if dateForrmat doesn't contain year

Reported by: chelsie Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.8.14
Keywords: Cc:
Blocked by: Blocking:

Description

I've created a datepicker object with dateFormat "dM" (eg "25Dec"). If you select a date sometime next year (eg "20Jan") and reopen the datepicker (or use datepicker.getDate), it reverts to the current date.

Reproduced here: http://jsfiddle.net/w5MNb/

-- Chels

Change History (1)

comment:1 Changed 8 years ago by Scott González

Resolution: invalid
Status: newclosed

That's because you're setting the minDate and the datepicker always assumes the date is in the current year since you're not storing the year.

Note: See TracTickets for help on using tickets.