Flatpickr formate with 12hr along with AM/PM

Viewed 1121

In react js use this option for time show in 12 Hr format eg. "4:45 AM" options={{ enableTime: true, noCalendar: true, dateFormat: "h:i K", }}

1 Answers

try this:

<Flatpickr
  value={requestDate}
  onChange={(date) => setRequestDate(date)}
  options={{
    enableTime: true,
    noCalendar: true,
    dateFormat: "h:i K"
  }}
  id="default-picker"
/>
Related