Skip to main content

Search and Top Navigation

#10465 closed bug (wontfix)

Opened August 04, 2014 07:12AM UTC

Closed August 04, 2014 01:49PM UTC

Last modified May 14, 2016 11:33AM UTC

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

Attachments (0)
Change History (3)

Changed August 04, 2014 01:49PM UTC by scottgonzalez comment:1

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.

Changed May 14, 2016 05:56AM UTC by VicMasih comment:2

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

Changed May 14, 2016 11:33AM UTC by scottgonzalez comment:3

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.