Skip to content

Changing Months Incorrectly Affects Input #762

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

Open
Guest98123 opened this issue Sep 22, 2014 · 0 comments
Open

Changing Months Incorrectly Affects Input #762

Guest98123 opened this issue Sep 22, 2014 · 0 comments

Comments

@Guest98123
Copy link

Thanks for the addon. See below, I simply included the javascript and assigned datetimepicker to an input. This occurs on the official example pages as well.

http://jsfiddle.net/8xjhjssm/

To replicate the issue, just click the blank input and click the next month button a couple of times, then try clicking the previous month button. You'll quickly notice it's assigning the wrong month to the input field as you move forward and back months. After you close the calendar, and reopen, the previous and next month buttons no longer change the dates, so the issue stops.

How I'm assuming it should work. Clicking the previous or next month buttons should never assign or change the input. If it's blank, it should stay blank until the user clicks a date.


Second related issue. If you set a minimum or maximum time, the previous and next month buttons may modify the input time incorrectly. See below, where I just set the minimum time to now, and maximum time 3 months from now, at 00:02.

http://jsfiddle.net/ucn9wg12/

To replicate, choose a date and time. Now, close and reopen the calendar to avoid the previous issue I mentioned, so we don't get both bugs happening at once. Now, just click ahead until the last month, 3 months in the future. You'll notice the time sliders automatically change to 00:02, but your input time remains the same. Now, click the previous month button. Suddenly, your input changes to 00:02. Try the reverse. Click all the way back to the first month. Once again, the sliders will change to the current time, and when you click the next month button, modify your input although you didn't make a selection.

In the above, I set the maxDate time to 00:02. This is because the bug will only happen if it's before the time you set on the input. And for the minDate, it's opposite, it'll cause the issue if it's after the input time.

Thanks for any help.

vuhp added a commit to vuhp/jQuery-Timepicker-Addon that referenced this issue Feb 9, 2015
…eTime(dp_inst) on event onChangeMonthYear.
@vuhp vuhp mentioned this issue Feb 10, 2015
trentrichardson added a commit that referenced this issue Feb 10, 2015
Fix issue #762 - Unnecessary call to tp_inst_updateDateTime(dp_inst on event onChangeMonthYear
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

1 participant