I\'m using the bootstrap-datepicker to check the days where my website got sales and I want to display or highlight the dates there was at least one sale. I can pass the dat
Using datetimepicker events show, update and change the date need to be highlighted.
The Blog post here explaining how it can achieve using Bootstrap Datetimepicker.
$('#datetimepicker').on('dp.show', function(e){
highlight()
})
$('#datetimepicker').on('dp.update', function(e){
highlight()
})
$('#datetimepicker').on('dp.change', function(e){
highlight()
})
function highlight(){
var dateToHilight = ["04/19/2019","04/20/2019","04/30/2019"];
var array = $("#datetimepicker").find(".day").toArray();
for(var i=0;i -1) {
array[i].style.color="#090";
array[i].style.fontWeight = "bold";
}
}
}
For more information see the blog
Reference:
https://sourcecodezoneseven.blogspot.com/2019/04/here-is-code-function-hilight-var.html