Fixed bug: datepicker initialized intermittently.