A calendar component with id wrapper. The calendar is run in controlled mode to allow for the today button to work.

Parameters:
NameTypeDescription
propsobject

Component props.

Properties
NameTypeDescription
calendarAttributesobject

Custom attributes for the calendar.

calendarClassesstring | Array | object

Custom classes for the calendar.

closeOnChangeboolean

Close the calendar when the value changes.

customAttributesobject

Custom attributes for the component.

customClassesstring | Array | object

Custom classes for the component.

idstring

The id for the component.

onAfterClosefunction

The after close event handler.

onAfterOpenfunction

The after open event handler.

onClosefunction

The close event handler.

onOpenfunction

The open event handler.

onResetClickfunction

The click event handler for the reset button.

onTodayClickfunction

The click event handler for the today button.

resetAttributesobject

Custom attributes for the reset button.

resetClassesstring | Array | object

Custom classes for the reset button.

showResetButtonboolean

Whether to show the reset button or not.

showTodayButtonboolean

Whether to show the today button or not.

spacingstring | number | Array | object

The spacing for the component, as a string, number, array, or object.

todayAttributesobject

Custom attributes for the today button.

todayClassesstring | Array | object

Custom classes for the today button.

triggerAttributesobject

Custom attributes for the trigger button.

triggerClassesstring | Array | object

Custom classes for the trigger button.

withTriggerboolean

Whether to show the trigger button or not.

Since
  • 4.4.0
Returns:

The Calendar component.

Type: 
JSX.Element
Example
import Calendar from '@gravityforms/components/react/admin/modules/Calendar';

return <Calendar />;