howljs / react-native-calendar-kit

React Native Calendar Kit is a powerful and flexible calendar component for React Native applications. It provides a customizable and feature-rich calendar view with support for various functionalities
https://howljs.github.io/react-native-calendar-kit/docs/intro/
MIT License
429 stars 73 forks source link

Parameter for time format Standard Hours vs Military hours #98

Closed erick-repo closed 1 month ago

erick-repo commented 6 months ago

I'm unable to find out how to set the standard hours to display as 1:00, 2:00, 3:00 pm instead of 13:00, 14:00, and so on. While I've seen some videos of the component rendering in this manner, it's not documented or I have not find it. Do you know how I can configure that? Here it is what i'm using atm:

        <TimelineCalendar
          viewMode="day"
          allowPinchToZoom
          ref={calendarRef}
          events={events}
          selectedEvent={selectedEvent}
          onEndDragSelectedEvent={setSelectedEvent}
          dragStep={20}
          unavailableHours={unavailableHours}
        />
erick-repo commented 6 months ago

OK ~ I was able to find by looking into the sourcecode. You can achieve this by passing this parameter into the component

hourFormat="h:mm A"