Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can choose the end date before the start date when using the rang pincker #821

Closed
vernon-lu opened this issue Feb 14, 2014 · 1 comment
Closed
Milestone

Comments

@vernon-lu
Copy link

when the first time to use DateRangePicker , the start date and the end date is empty,now you choose the start date, then you choose the end date, you will find you can choose the date before the start date, and vice versa.
I find the code in dateUpdated

if (new_date < this.dates[i]) {
        // Date being moved earlier/left
        while (i >= 0 && new_date < this.dates[i]) {
             this.pickers[i--].setUTCDate(new_date);
        }
}
else if (new_date > this.dates[i]) {
        // Date being moved later/right
        while (i < l && new_date > this.dates[i]) {
             this.pickers[i++].setUTCDate(new_date);
       }
}               

here must check whether the this.dates[i] is null

@eternicode eternicode added this to the 1.3.1 milestone Feb 15, 2014
@acrobat acrobat modified the milestones: 1.3.2, 1.4.0 Dec 15, 2014
@acrobat
Copy link
Member

acrobat commented Dec 27, 2014

Fixed in #1036

@acrobat acrobat closed this as completed Dec 27, 2014
@acrobat acrobat mentioned this issue Dec 27, 2014
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants