#8510 closed bug (duplicate)
parseDate() fails if no day in format
Reported by: | lostapathy | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.datepicker | Version: | 1.8.23 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
parseDate() fails for formats such as "MM yy" where no day is specified. This makes applications of the datepicker such as http://jsfiddle.net/timbuethe/PxGHV/ fail to parse the currently selected date correctly. That in turn always starts the picker at today's date rather than what was selected previously.
I suggest changing parseDate() to default the day to 1 in cases where the date format does not include a day rather, than than failing to parse, so that the datepicker can work for use cases such as this.
Change History (4)
comment:1 Changed 10 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:3 Changed 10 years ago by
I think this is a different issue than #7759. That ticket wants to pick a day/month without any year, which is indeed nothing like a meaningful date.
This ticket seeks to allow picking of month/year and assume the first of the month for the day. That yields a valid date, where as the other case is not.
Not an exact duplicate, but it's the same rationale.