Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#10465 closed bug (wontfix)

jQuery-ui datepicker method “getDate”, when using div as container, returns date even if user hasn't selected anything (should return null)

Reported by: Telegard Owned by:
Priority: minor Milestone: none
Component: ui.datepicker Version: 1.11.0
Keywords: Cc:
Blocked by: Blocking:

Description

Issue: jQuery-ui datepicker method “getDate”, when using div as container, returns date even if user hasn't selected anything (should return null)

Browsers: Chrome / Safari / Firefox

Operating System: Mac OSX 10.9.4

To Reproduce: Use <div> as container for DatePicker, do not select date on DatePicker, execute getDate method on DatePicker. Will return Date Object instead of null.

jsFiddle: http://jsfiddle.net/Y598M/3/

Associated issue: This actually leads me to suspect another problem I am having is related to this as well, where the class "ui-datepicker-current-day" is being assigned to the default "today" cell when the datepicker is first rendered (which is also incorrect as no current-day has been selected yet).

A Patch: Sorry I am not familiar enough with jQuery source to create a patch.

This issue makes is difficult to figure out if the user has intentionally selected today's date or not.

Thank you. ~Telegard

Change History (3)

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

Resolution: wontfix
Status: newclosed

Unfortunately, this isn't something we'll change prior to finishing the rewrite. The new implementation solves this by splitting out inline datepickers and input datepickers into their own widgets. The inline datepicker will have a value option, so it will be explicit and possible to set the value to null. So, while this is being closed as won't fix, the general problem will be fixed.

comment:2 Changed 3 years ago by VicMasih

Dear team,

Kindly update us on this fix and release schedule. I tried with latest JQUERY-UI version 1.11.4 but the issue persists. Could this be taken as priority please or a temporary solution be given meanwhile?

Thanks a lot for your help.

Sincere Regards, Victor

comment:3 Changed 3 years ago by Scott González

You can look at the roadmap to see when the datepicker rewrite is scheduled for release (1.13.0). We do not assign dates to releases.

Note: See TracTickets for help on using tickets.