The Yii extension DateTimePicker is a great extension when you want a user to be able to select a date and time within the same popup for an input. We have recently started to use it extensively for dates & times that occur in future months. We ran into a problem, however, in that the date would default to today’s date – a real headache for the user. The root cause of the problem is that the Yii extension’s jQuery files are a few versions behind. To fix it, you can upgrade the ‘assets’ folder with the new version of Trent Richardson’s jQuery-TimePicker-addon extension. Here’s a step-by-step:
- Download the zipped jQuery-TimePicker-addon from github
- Extract the zipped contents into your protected/extensions/timepicker/assets folder
- Test it out!