|
Download wp-calypso/client/blocks/calendar-popover/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.51 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/blocks/calendar-popover/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/blocks/calendar-popover/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/blocks/calendar-popover/README.md
1.51 kB
Calendar Popover
This component shows a Popover with a calendar inside.
Beyond combining Popover and PostSchedule, this component connects with the state-tree, so in this way timezone data related to the site configuration is propagated automatically.
Usage
import { Button } from '@automattic/components';
import CalendarPopover from 'calypso/blocks/calendar-popover';
const toggle = () => this.setState( { show: ! this.state.show } );
const buttonRef = React.createRef();
function render() {
return (
<div>
<Button ref={ buttonRef } onClick={ this.toggle }>
Show Popover
</Button>
<CalendarPopover context={ buttonRef } isVisible={ this.state.show } />
</div>
);
}
Props
The following props can be passed to the CalendarPopover component:
children
| Type | Element |
| Required | No |
Connect Props
gmtOffset
| Type | Number |
The site's UTC offset.
timezoneValue
| Type | String |
The site's timezone value, in the format of 'America/Araguaina (see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
Props propagated to the <Popover />
autoPositioncloseOnEscignoreContextisVisiblepositionshowDelayonCloseonShow
Props propagated to the <PostSchedule />
eventsselectedDaysiteIdonDateChangeonMonthChange