Export to GitHub

jquery-datepicker - issue #374

can't select a previous date


Posted on Jul 10, 2013 by Massive Dog

What steps will reproduce the problem? If user select some date, for example, 10/07/2013 and then entered an invalid date(before startDate or after endDate, for example, 00/00/0000) into an input field and after that tried to select previous date(10/07/2013), then input field value will not change(00/00/0000), but in calendar will be selected 10/07/2013.

Please provide a URL to a page displaying the problem. http://www.kelvinluck.com/assets/jquery/datePicker/v2/demo/datePicker.html

What version of the datepicker are you using? On what operating system? And Which Browser? the last one. Ubuntu 13.04. All browsers.

Please provide any additional information below. I think that bug is here: setSelected : function(d, v, moveToMonth, dispatchEvents) { if (d < this.startDate || d.zeroTime() > this.endDate.zeroTime()) { // Don't allow people to select dates outside range... return; }

if we will change "return;" to "this.clearSelected();", script will work without this bug.

P.S. Sorry for my bad English :))

Comment #1

Posted on Jul 15, 2013 by Happy Giraffe

The date picker code is now on github: https://github.com/vitch/jQuery-datepicker

If you can provide a pull request there I will be happy to merge it.

Thanks!

Status: Verified

Labels:
Type-Defect Priority-Medium