A decent and pretty date picker to be used with React
Name | Type | Default | Description |
---|---|---|---|
value | union(String | Date | MomentDate) |
optional. Current date | |
valueLink | {value: ?String | Date | MomentDate, requestChange: Function} |
optional. ValueLink object to replace "value" and "onChange" | |
onChange | {jsDate: Date, dateString: string} |
optional. Called when value changes | |
onShow | Function |
"onShow" |
optional. Called when datepicker is opened |
onHide | Function |
"onHide" |
optional. Called when datepicker is closed |
onClear | Function |
optional. Called when value is cleared | |
small | Boolean |
false |
optional. Whether it's small or not |
defaultValue | union(String | Date | MomentDate) |
optional. Default date | |
minDate | union(String | Date | MomentDate) |
optional. Minimum date selectable by the user | |
maxDate | union(String | Date | MomentDate) |
optional. Maximum date selectable by the user | |
locale | String |
optional. Locale used for translations | |
startMode | enum("day" | "month" | "year") |
"day" |
optional. The start view of the datepicker |
startDate | union(String | Date | MomentDate) |
optional. Specify an initial "visible" date with no need to select a defaultValue | |
fixedMode | Boolean |
optional. Whether the user can use multiple views or not | |
displayFormat | String |
optional. MomentJS format used to display current date | |
returnFormat | String |
optional. MomentJS format used to format date before returing through "onChange" | |
format | String |
optional. MomentJS format used to format date before returing through "onChange" | |
validationFormat | String |
optional. MomentJS format used to format date before returing through "onChange" | |
showOnInputClick | Boolean |
optional. Whether the datepicker should open when user click on the input | |
closeOnClickOutside | Boolean |
true |
optional. Whether the datepicker should close when user clicks outside of it |
showInputButton | Boolean |
true |
optional. Whether the input-button should be rendered |
autoClose | Boolean |
true |
optional. Pass true if you want the datepicker to close automatically after the user selects a value |
floating | Boolean |
true |
optional. Whether the datepicker should float over the page content (absolute position) |
disabled | Boolean |
optional. Whether the datepicker should be disabled or not | |
position | enum("top" | "bottom") |
"bottom" |
optional. Whether the datepicker should be rendered above or below the input field |
iconClassName | String |
"icon-rc-datepicker icon-rc-datepicker_calendar" |
optional. Classname used for the icon |
iconClearClassName | String |
"icon-rc-datepicker icon-rc-datepicker_clear" |
optional. Classname used for the clear icon |
className | String |
"" |
optional. ClassName used for the wrapper div |
style | Object |
{} |
optional. Style used for the wrapper div |
placeholder | String |
optional. |