2

I am using react-datetime control for npm package :click here. In that time picker how should I set Interval. For example I want to set interval in every 5 minutes so first show 0 then 5,10,15 etc. how can I achive this?

I am using look like this but not working :

Example

Ravi Shah
  • 843
  • 12
  • 29

1 Answers1

4

timeConstraints allows for custom step configuration, so, it should look like:

  minutes: { step: 5 }

example:

{
  timeConstraints = {
    minutes: {
      step: 5
    }
  }

  render() {

    return (
      <Datetime timeConstraints={this.timeConstraints} />
    );
  }
}
Hitmands
  • 13,491
  • 4
  • 34
  • 69