Disable Calendar Fast Navigation Bar globally

1 Answer 180 Views
Calendar DatePicker Filter  Grid
David
Top achievements
Rank 1
Iron
Iron
Veteran
David asked on 15 May 2023, 05:37 AM

Hi,

The Calendar Fast Navigation Bar is currently broken in all versions of KendoReact that support React 18 as per https://github.com/telerik/kendo-react/issues/1566. We are working around the issue by disabling the Calendar Fast Navigation Bar as described here https://www.telerik.com/kendo-react-ui/components/dateinputs/calendar/sidebar/.

Unfortunately this does nothing to address the issue in KendoReact Grid filter menus - see this StackBlitz for an example: https://stackblitz.com/edit/react-va2kr1?file=app%2Fmain.tsx.

Is there a way to globally disable the Calendar Fast Navigation Bar so we don't have to do this everywhere and create a custom Grid filter?

 

David
Top achievements
Rank 1
Iron
Iron
Veteran
commented on 15 May 2023, 06:23 AM

This can be done using the CalendarPropsContext as described here.


const calendarProps = React.useCallback(
    (calendarProps: CalendarProps) => ({
      ...calendarProps,
      navigation: false,      
    }),
    []
  );

return (
    <CalendarPropsContext.Provider value={calendarProps}>
      ...
    </CalendarPropsContext.Provider>
  );

1 Answer, 1 is accepted

Sort by
0
Accepted
David
Top achievements
Rank 1
Iron
Iron
Veteran
answered on 15 May 2023, 06:23 AM

This can be done using the CalendarPropsContext as described here.


const calendarProps = React.useCallback(
    (calendarProps: CalendarProps) => ({
      ...calendarProps,
      navigation: false,      
    }),
    []
  );

return (
    <CalendarPropsContext.Provider value={calendarProps}>
      ...
    </CalendarPropsContext.Provider>
  );

Vessy
Telerik team
commented on 16 May 2023, 08:34 AM

Thank you for sharing the found solution with the community, David!
Tags
Calendar DatePicker Filter  Grid
Asked by
David
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
David
Top achievements
Rank 1
Iron
Iron
Veteran
Share this question
or