-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
Month selector always wrong on 30 or 31 of the month if you select months that has lesser days #297
Comments
Hi @dickverweij, please can you describe more precisely how you use the date picker. Your bug report is totally correct, but as far as I can play with the date picker, I have to click onto a date to set the new date. Changing month has no effect on selected date. I don't find how to reproduce the bug! I wish to correct it. Thank you. |
Note you can ONLY reproduce the bug if the CURRENT DATE is > 29 of the month.. and the month you want to set hasn’t that many days.. $scope.currentDate is the current date. $scope.currentDate.setMonth(4) .. what is currentDate now? So IF you use the date picker ON the date 31-3-2017, when you press on April,.. you think you GOTO april, but you will go to may.. |
Thanks for the feedback. I fixed it on my fork but haven't released the new version for now, I'm looking for some other things to fix these days. I found that the next month selector was bug free since it first sets the day to 1, but the previous month selector indeed had the bug. From March 28 you were jumping to January. My fix was simply also setting to day to 1 when going back to previous month. Oops, I misunderstood, not only next/previous month but also any month. I'll fix it. https://github.com/OSAMES/ionic-datepicker/commits/v1.4.0 |
Hi @dickverweij I fixed it the same way, setting day to 1 before setting current month. Fixed on my fork, version 1.4.0. bower package name is ionic-datepicker-fork-ionic1 My fork : https://github.com/OSAMES/ionic-datepicker I wish I could do a pull request but since I changed package name etc I don't know how to handle this. |
Fixed for original project : #315 |
Hi @dickverweij in case you're still interested, my stable fork is ready (version 1.5.0): https://github.com/OSAMES/ionic-datepicker |
@postb99 Can you change the positions of the close and set button please in your fork? Thanks! |
Hi @fgagneten, you're right, it's a better idea to swap them. I do this now, this will be version 1.5.1. |
OK @fgagneten, it's ready, you can install it using bower. https://github.com/OSAMES/ionic-datepicker/releases/tag/v1.5.1 |
Thanks @postb99 , how can I using with bower? Please, give me the line code to run. Thanks |
@postb99 There is such a big error. Please, see this video to know what's going on with this fork: Using the original library this error not happening. Please, is too important to solve the problem when you limit the first and the last day in the calendar |
This is caused by the following code that appears everywhere in the code.
$scope.currentDate.setMonth(XXX)
For example:
if the currentDate = 31-Jan-2017 setting the month on februari
will result in 31-Feb-2017. That date does not exist and will result in 03-Mar-2017
The text was updated successfully, but these errors were encountered: