Open picker from a button
Hi,
I am facing an issue to open the pickers by clicking on a external button, is that currently possible ?
Hi, yes it is possible
<DateTimePicker
ref={node => { this.picker = node; }}
/>
<Button onClick={() => this.picker.togglePicker()}
Thanks for quick response it works perfectly
there is one more thing, i am trying to do. Need to gray out all past dates (only gray out not disable they still needs to be selectable) is that possible ?
Yes, using renderDay prop - you can find description in readme, and example on demo, under CustomElemnts section
oh thanks did knew this was the function i was looking for.
I just tried the 'togglePicker' method using a <DatePicker> and it doesn't appear to work. Maybe this is only on a <DateTimePicker>? Is there a way to open a <DatePicker> from JavaScript?
Looks like you can do 'this.picker.wrapper.open()'. Not sure if this is the supported way though. Can anyone confirm this?
any above doesn't work.tried ref ,datepickerDialog,that wrappr.open thing,ref.show function nothing works. issue still exist
@jashacharya Use the open/onClose/onOpen props.