1

In this: <lightning-input type="datetime" name="EventStartDateTime">

How do I set the min and max values for time ( 06:00 to 11 pm ) and Date (Min: Today and Max: Today +10 years) ?

closed as off-topic by Sebastian Kessel, glls, Vijay Ganji, Derek F, battery.cord Aug 14 at 14:21

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on problems in code you've written must describe the specific problem and include valid code to reproduce it. For help writing short, self-contained syntactically-valid examples, see: SSCCE.org" – Sebastian Kessel, glls, Vijay Ganji, Derek F, battery.cord
If this question can be reworded to fit the rules in the help center, please edit the question.

1

You cannot do like the way you want. But you can set between two datetime as below:-

<lightning:input type="datetime" name="input5" label="Date Time field with min and max values" value="2017-09-12T18:13:41Z" min="2017-08-03T08:20:44Z" max="2017-09-25T22:33:44Z" />

As a workaround, You can write validation on the selected value of the input field.

Not the answer you're looking for? Browse other questions tagged or ask your own question.