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

goToDate future - Add time with the date #51

Closed tomwotton closed 1 year ago

tomwotton commented 1 year ago

Can you please add the time to this I need to scroll the diary to the the particular event time I have edit.

howljs commented 1 year ago

You can try with isoString

howljs commented 1 year ago

Example: 01/01/2023 12:00:00

// Go to the display area containing the time: 12:00
calendarRef.current?.goToDate({
            date: new Date(
              new Date('2023-01-01').setHours(12, 0, 0, 0)
            ).toISOString(),
            hourScroll: true,
          });
// Go to the exact time:
calendarRef.current?.goToDate({ date: '2023-01-01' });
calendarRef.current?.goToHour(12);
tomwotton commented 1 year ago

Thanks