You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the angular version of flatpicker. In this I want a functionality like changes the time format from 24h to 12 h or vice versa by using external button of time format.
I am using the angular version of flatpicker. In this I want a functionality like changes the time format from 24h to 12 h or vice versa by using external button of time format.
.ts code configuration of flatpicker
` ```
dateTimePicker: FlatpickrOptions = {
altInput: true,
altInputClass: 'flatPicker',
enableTime: true,
altFormat: 'M j, Y H:i',
dateFormat: 'Y-m-d H:i',
minDate: 'today',
time_24hr: true,
defaultDate: new Date().ISOString(),
disableMobile: true
};
toggleTimeFormat(value) {
if(value === '12h') {
this.dateTimePicker.time_24hr = false;
this. dateTimePicker,altFormat: 'M j, Y H:i',
dateTimePicker.dateFormat: 'Y-m-d H:i',
}
}
Anybody suggest me, how I can achieve this?
The text was updated successfully, but these errors were encountered: