fixed datepicker class form field logic