The only way I could get minTime to truly work, was not to write this.minTime: "11:00" as shown in the documentation, but rather only by setting it to true or false. That is, per the code below, I set the value to true if the date is today, but if not, then there is no minTime.
Note: that this is inside of a angular TS file, but i don't think that should make a difference. please correct me if i'm wrong. Either way, this post might be useful to someone else.
minTime:true,
onChangeDateTime:function( selectedDateTime ){
var date = new Date();
var baseTodayAsNumber = new Date(date.getTime()).setHours(0,0,0);
var baseSelectedDate = new Date(selectedDateTime).setHours(0,0,0);
if(!(new Date(baseTodayAsNumber).toString() == new Date(baseSelectedDate).toString())) {
this.setOptions({
minTime: false
})
} else {
this.setOptions({
minTime: true
})
}
},
The only way I could get minTime to truly work, was not to write this.minTime: "11:00" as shown in the documentation, but rather only by setting it to true or false. That is, per the code below, I set the value to true if the date is today, but if not, then there is no minTime.
Note: that this is inside of a angular TS file, but i don't think that should make a difference. please correct me if i'm wrong. Either way, this post might be useful to someone else.