DateTime time only picker - default minute selection

DateTime time only picker - default minute selection

maltymalty Posts: 1Questions: 1Answers: 0

I am using the standalone DateTime extension with luxon, set to format HH:mm.

When you select an hour first, the minute selection defaults to the current time. Am I able to set a default to 00? If not, would a feature like this be considered?

Answers

  • allanallan Posts: 64,646Questions: 1Answers: 10,688 Site admin

    Hi,

    You need to have an initial value for that to work - e.g.: https://live.datatables.net/jorojina/1/edit .

    If there isn't an initial value, then it will default to the current time (and then adjust to meet the selection).

    It sounds like you might have an empty initial value and want to change that behaviour so that it will round the value to the nearest hour - is that correct? I'd certainly consider a PR for something like that. Not sure what the option for it should be called - roundMinutes or initialMinutes or something like that. initialRound perhaps, and it would do seconds as well?

    Allan

Sign In or Register to comment.