javascript in edit.ctp for date picking