I'm using React Date Picker and I need also include time to the Date selection. I didn't find any example from documentation how to implement this. Does DatePicker provide any functionality for this out of box, or do I have to customize it myself?
I'm using React Date Picker and I need also include time to the Date selection. I didn't find any example from documentation how to implement this. Does DatePicker provide any functionality for this out of box, or do I have to customize it myself?
Share Improve this question asked Jul 4, 2016 at 7:54 Tuomas ToivonenTuomas Toivonen 23.5k51 gold badges144 silver badges243 bronze badges 1- Please post the answer – CodeZombie Commented Apr 2, 2018 at 10:38
2 Answers
Reset to default 9just add showTimeSelect
<DatePicker
selected={this.state.startDate}
onChange={this.handleChange}
showTimeSelect
timeFormat="HH:mm"
timeIntervals={15}
dateFormat="LLL"
/>
check more examples @ reactdatepicker
You can use react-date-picker
module for a date with a timestamp.
You can include the time by including timestamp in your dateFormat
property.
E.g.: dateFormat="DD/MM/YYYY HH:mm:ss"
EDIT:
Original links are not working anymore. Here's more information about react-date-picker
. https://www.npmjs./package/react-date-picker
Original links:
http://zippyui./docs/react-date-picker/
https://github./zippyui/react-date-picker/