Min value is displayed as active, but cannot be selected when clicked
See original GitHub issueHi there,
I’m facing an issue with the calendar: while my min date is set and it’s displayed as selectable, I actually can’t select it when I click on it, but I can select the max value, ironically.
I’m setting values like this in the TS file:
@Input() beginDate= new Date('2019-05-16');
@Input() endDate =new Date('2019-06-15');
@Input() selectedDate= new Date('2019-05-18');
And this is what i write in the component template:
<input [owlDateTimeTrigger]="dt1" [owlDateTime]="dt1" [min]="beginDate" [max]="endDate" [value]="selectedDate">
<owl-date-time [pickerType]="'calendar'" #dt1></owl-date-time>
Can anybody bring any light on this? Thanks in advance!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
HTML number input min and max not working properly
When I change the time in the rendered UI using the little arrows on the right-hand side of the input field, everything works...
Read more >HTML5 Forms: Min, Max, Step Type Attribute - Wufoo
To use the min, max, and step attributes the input first needs a type of number, range or one of the date/time values....
Read more ><input>: The Input (Form Input) element - HTML
Displays as a range widget defaulting to the middle value. Used in conjunction min and max to define the range of acceptable values....
Read more >Edit Menu - ImageJ
Alt-click in the Image>Colors>Color Picker window to change the background color. With stacks, a dialog is displayed offering the option to clear the...
Read more >How to use the forms controls on a worksheet in Excel
Click Popular, select the Show Developertab in the Ribbon check box, and ... Note: The INDEX() formula uses the value in G1 to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve found a workaround: Make sure to set the
min
to midnight in local time, including milliseconds. So to set the minimum date to tomorrow, do it like this:minDate = moment().add(1, 'd').set({hours: 0, minutes: 0, seconds: 0, milliseconds: 0});
This way the date compare function won’t get confused, and selecting the min date will work.
You need to set the min to current date with 0 hour, 0 minute and 0 second