lundi 2 juillet 2018

Inject data in a function for a datePicker

I am using ember flatpickr in my ember App.

It will be used in a component that also contain a date. I want to allow selection depending on the date.

To use a function with flatpickr I use the following working property:

dateDisabled: [function(date){
    let day = date.getDate()
    if (day & 1){
      return false;
    }else{
      return true;
    }   }]

This function test every date displayed by the date pickr and return a boolean to make the date selectable or not.

How can I pass a property to this function ?




Aucun commentaire:

Enregistrer un commentaire