Skip to content

Allow to set when time picker startsΒ #1582

@jamesattard

Description

@jamesattard

Expected behavior

Allow to set the timepicker to start at a specified time. This will be useful if you have a 1hr interval to display only times like: 8:30AM, 9:30AM, 10:30AM, etc..

Actual behavior

At the moment there is no option to set the time. Even if you set the minTime to, for example, 8:30AM, while the interval is set to one hour, the timepicker will start at 9AM.

In other words, by default it shows on the hour, ex. 8:00AM, 9:00AM, etc. This is not flexible if you want to display timeslots that are not necessarily on the hour.

Steps to reproduce

            <FixDatePickerTimer>
              <DatePicker
                inline
                onChange={this.handleChange}
                showTimeSelect
                timeFormat="HH:mm"
                timeIntervals={60}
                timeCaption="time"
                minTime={moment()
                  .hours(8)
                  .minutes(30)}
                maxTime={moment()
                  .hours(17)
                  .minutes(30)}
              />

reactpicker

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions