Fixing datepicker status initialization