# Calendar Button
This component is used to display a calendar button. When it pressed, it shows a Popover with a calendar inside.
## Usage
```jsx
import CalendarButton from 'calypso/blocks/calendar-button';
function render() {
return ;
}
```
## Props
### `children`
### `icon`
| Type | String |
| Required | No |
| Default | calendar |
If the component doesn't have children elements then an icon (Gridicon) will be rendered inside of this one.
### `popoverPosition`
| Type | String |
| Required | No |
| Default | bottom |
It defines the position of the Popover once it shows. This value is propagated to the `` instance through of the `position` property.
### `type`
| Type | String |
| Required | Yes |
| Default | button |
This property defines to this component as a `button`. You shouldn't change this it.
### Props propagated to the ``
- `autoPosition`
- `closeOnEsc`
- `events`
- `ignoreContext`
- `isVisible`
- `selectedDay`
- `showDelay`
- `siteId`
- `onClose`
- `onDateChange`
- `onMonthChange`
- `onShow`
### Props propagated to the ``
- `selectedDay`: the date which will be shown initially
- `siteId`: Passing siteId the calendar will try to get values related with time zone.
- `onDateChange`: Function to be executed when the user selects a date.
## Examples
### As much simple as possible
```jsx
import CalendarButton from 'calypso/blocks/calendar-button';
function render() {
const tomorrow = new Date( new Date().getTime() + 24 * 60 * 60 * 1000 );
return ;
}
```
### Custom calendar icon
```jsx
import CalendarButton from 'calypso/blocks/calendar-button';
function render() {
return ;
}
```
### Render using children property
```jsx
import CalendarButton from 'calypso/blocks/calendar-button';
function render() {
return (
Open Me!
);
}
```