rajeshwarpatlolla / ionic-datepicker

'ionic-datepicker' bower component for ionic framework applications
MIT License
643 stars 357 forks source link

Today button not working #300

Open alexandretok opened 7 years ago

alexandretok commented 7 years ago

The today button doesn't work when I have the option closeOnSelect: true.

The callback isn't fired and the calendar just closes. I can see that the today date is highlighted right before the calendar fades.

postb99 commented 7 years ago

I've fixed it on my fork but not tagged for now. It fact it was a wrong feature :-)

https://github.com/OSAMES/ionic-datepicker/commit/46f5c6fa2969ce096330123735657fdfeda55eec

postb99 commented 7 years ago

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.

shankari commented 5 years ago

It looks like commits https://github.com/rajeshwarpatlolla/ionic-datepicker/commit/45631a40970ba5136caca04ea34169a329af53a1 and https://github.com/rajeshwarpatlolla/ionic-datepicker/commit/0fb4e662268fc482c1f015f6f1a2522cd583b8bb (currently on master) might have also fixed this? Trying now. These are the last two commits merged to master, so just syncing directly to https://github.com/rajeshwarpatlolla/ionic-datepicker/commit/6dcbf0d31bd5e4a0d29738ebde18951830dc0411 which is the merge commit.

shankari commented 5 years ago

Those commits will probably fix the issue, but the distfile has not been rebuilt to include them. I am rebuilding the distfile using gulp. @rajeshwarpatlolla if I submitted a PR with an updated dist file would you be open to merging it?

shankari commented 5 years ago

@postb99 I tried your fork and it still doesn't work. See attached gif. I looked at your code https://github.com/OSAMES/ionic-datepicker/blob/master/src/ionic-datepicker.provider.js#L404 and it looks like the callback is not invoked like in https://github.com/rajeshwarpatlolla/ionic-datepicker/commit/45631a40970ba5136caca04ea34169a329af53a1

Any thoughts on how your fork is supposed to work?

datepicker_today_not_working mov

postb99 commented 5 years ago

I am not able to work anymore on this project/my fork, I will close my PR and think you can go on with improvement of official project @shankari