mugifly / jquery-simple-datetimepicker

Date & time picker for jQuery, It's simple & clean.
http://mugifly.github.com/jquery-simple-datetimepicker
Other
260 stars 182 forks source link

When you click the Date Picker to change Month Calendars, it changes the Input Month Value! #151

Closed jasondavis closed 8 years ago

jasondavis commented 9 years ago

If you look at any of the demos and simply click to change the Month calendar shown, you'll notivce each time it updates the input value with the month you are viewing.

THis is a bug as it should only update the selected date when a date is clicked on. Changing to view different months should not change the month value for your selected date until you decide to click a new date!

2015-05-13_19-25-42

The image below shows that simply changing the month view also changes your selected day date value to the new month! I would love to have this fixed to work how other DatePickers work which do not select a new date unless you click on a new date or set it using code. Any ideas for a fix please anyone?

2015-05-13_19-29-36

Would love to see a fix for this if anyone can help please?

mugifly commented 9 years ago

This behavior is specification of this library.

However It may not be desirable in some case. So, It should be adding the suppress option.

mugifly commented 9 years ago

I got it; I trying to adding the option now :)

jasondavis commented 9 years ago

Thanks, I also tried modifying it myself but was unable so far to get it to not change when new month calendar is drawn. It seems each time a calendar month is "drawn" it takes the Day date value and sets it for that current month even if the selected date is a previous month value.

If you look at the other date picker libraries you will see that most do not behave this way. Changing the month to brows month calendars should not change the selected date value.

Did you have any luck in getting a chance to work by any chance? This is the only issue that is preventing me from using this in my application so I am really hoping that a solution can be found, I would be very thankful and grateful as well.

Thank you

royzrj commented 8 years ago

@jasondavis I just sent a PR to fix this issue, feel free to contribute if you see fit.