Sha256: 489cd21a8081709b3f7955560d5175ce34e1c9c1e1b04020c72db06c474af1b4
Contents?: true
Size: 940 Bytes
Versions: 97
Compression:
Stored size: 940 Bytes
Contents
import React, { useEffect } from 'react' import { Button, DatePicker } from '../../' const DatePickerFlatpickrMethods = () => { let fpInstance useEffect(() => { fpInstance = document.querySelector('#fp-methods')._flatpickr }, []) const clickHandlerClear = () => { fpInstance.clear() } const clickHandlerClose = () => { fpInstance.close() } const clickHandlerToday = () => { fpInstance.setDate(new Date(), true) } return ( <div> <Button marginRight="sm" onClick={clickHandlerClose} text="Close" /> <Button marginRight="sm" onClick={clickHandlerClear} text="Clear" /> <Button onClick={clickHandlerToday} text="Today" /> <DatePicker hideLabel marginTop="sm" pickerId="fp-methods" /> </div> ) } export default DatePickerFlatpickrMethods
Version data entries
97 entries across 97 versions & 1 rubygems