0

I need to disable certain dates of mentioned year in the array.

var availableDates = ["02/10/2014","03/11/2014","07/12/2014","08/11/2015"];

which only should be visible on the control. so Manually, we are calculating the missing dates in above mentioned array & treating them as invalid dates. The same is passed to invalid attribute of mobiscroll. But no luck.

Could any one guide about this.?

Parag Diwan
  • 3,007
  • 2
  • 19
  • 37

1 Answers1

1

You should pass invalid dates as javascript date object for mobiscroll:

$('#test').scroller({
  preset: 'date',
  invalid: { dates: [ new Date("02/10/2014"), new Date("03/11/2014"), new Date("07/12/2014"), new Date("08/11/2015") ] }
});

Check out the invalid option description at http://docs.mobiscroll.com/datetime-preset

istvan.halmen
  • 3,320
  • 1
  • 23
  • 29