ember-cli-bootstrap-datepicker
ember-cli-bootstrap-datepicker copied to clipboard
How can I use the beforeShowDay function
Hi. I want to just let some dates availables to select. How can I use that function beforeShowDay?
I used to do something like that years ago :laughing:
beforeShowDay : function(date){
var y = date.getFullYear().toString(); // get full year
var m = (date.getMonth() + 1).toString(); // get month.
var d = date.getDate().toString(); // get Day
var currDate = y+'-'+m+'-'+d;
if(dates.indexOf(currDate) >= 0){
return [true,"ui-highlight", ""];
}else{
return [false];
}
},
This option of bootstrap-datepicker
does not seem to be supported by ember-cli-bootstrap-datepicker
yet: https://github.com/soulim/ember-cli-bootstrap-datepicker/blob/master/addon/components/datepicker-support.js#L17-L44
Yeah, @jelhan is right. The component doesn't have support for this option yet :disappointed: