ember-cli-bootstrap-datepicker icon indicating copy to clipboard operation
ember-cli-bootstrap-datepicker copied to clipboard

How can I use the beforeShowDay function

Open juliankmazo opened this issue 9 years ago • 2 comments

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];
    }                   
},

juliankmazo avatar Aug 13 '15 22:08 juliankmazo

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

jelhan avatar Aug 21 '15 10:08 jelhan

Yeah, @jelhan is right. The component doesn't have support for this option yet :disappointed:

soulim avatar Aug 21 '15 11:08 soulim