I have been working in an ASP.NET Webform project where AngularJs is used. In a form angularJs datetime picker is used to show date and time. Whenever the form is open datetime should show in the fields. The problem is it’s working in Chrome browser but in Firefox datetime is not showing while the page is load whenever the form is load in the first time. The field shows blank. The code for the datetime control is given bellow.
<div class="angular-date-picker">
<angular-date-picker ng-model="UserDateTimeSettings.SelectedDate"
format="UserDateTimeSettings.DateFormat"
selected-date="UserDateTimeSettings.SetDatePickerDate"
date-changed="dateChanged(value)">
</angular-date-picker>
</div>
<div ng-class="datePickerClass">
<div class="angular-time-picker">
<uib-timepicker ng-model="UserDateTimeSettings.TimePickerDate"
ng-change="TimePickerChanged()"
class="custombtn bs-theme-color"
hour-step="hstep"
minute-step="mstep"
show-meridian="UserDateTimeSettings.IsAmPmVisible">
</uib-timepicker>
</div>
<div class="due-date-zone">{{UserDateTimeSettings.AbbreviatedName}}</div>
</div>
In Firefox no error message is given in console either. Can anyone help me how to solve the problem.
I found the problem. The problem is the date format. The date which I am receiving from API is in incorrect format and Firefox does not parse it. This is why datepicker control can not show the date.