OverviewGetting startedDatepickerDatepicker attached to the inputChange visual themeUtilities
Customize UI
Year
component displays specific date with year precision. onDateSet
callback prop allows to set provided Date object as selected in Datepicker
. Replace it with custom component.
Demo datepicker
Jan 6th
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
Props
isSelected
bool
required
isHighlighted
bool
required
onDateSet
func
required
date
Class(Date)
required
isCurrent
bool
required
name
{
"numeric": "number"
}
required
Wrap with custom CSS class
You can override CSS classname of Day Calendar element, see yearCalendarClassName
prop.
<DatepickeronDateSet={date => {console.log('date set', date);}}minPrecision="day"monthCalendarClassName="yearCalendarClassName"title="Demo datepicker" />