Open ghost opened 6 years ago
+1
me too
possible issue could be that you are not setting the state properly or invalid format string,
this.state={
value:'11:00'
}
<Timepicker
defaultValue={moment(this.state.value)}
onChange={(timeValue)=>{
// for hours and minutes use HH:mm only, not HH:MM
this.setState({ value: timeValue.format('HH:mm') })
// for hours and minutes and seconds use HH:mm:ss only, not HH:MM:SS
this.setState({ value: timeValue.format('HH:mm:ss') })
}}
/>
are u import style file?
import 'rc-time-picker/assets/index.css';
then check it :-)
Perhaps that import statement should be in the README?
This is strange issue because I managed to make time-picker work in another react project, but in this one, even if I try to use the most basic example:
<TimePicker defaultValue={moment()} showSecond={false} />
It does show visually the textfield like component which has current time in it, but when I click it, the dropdown menu doesn't show up. Neither can I type anything.
React version in package.json "^16.3.2"
Here are my imports
import TimePicker from "rc-time-picker"; import moment from 'moment'; import 'rc-time-picker/assets/index.css';
What can be causing this?
Did you find any solution ????
This is strange issue because I managed to make time-picker work in another react project, but in this one, even if I try to use the most basic example:
It does show visually the textfield like component which has current time in it, but when I click it, the dropdown menu doesn't show up. Neither can I type anything.
React version in package.json "^16.3.2"
Here are my imports
What can be causing this?