I´m trying to include “w0” as invalid on Range script but parameter “w0” works only in past dates.
I´ve tested w1, w2 (…) w6 and it´s everything ok, the bug occurs only with ‘w0’ on future dates.
Check attached gif please.
I´m using Windows 10 + Chrome 70.0.3538.77 64bits
http://staging.getmalas.com.br/webapp
At address field, type “Av Prudente de Morais Belo” and pick first option
Then will appear datepicker
$(document).ready(function() {
// Mobiscroll
$('#demo').mobiscroll().range({
startInput: '#start',
endInput: '#end',
//min: min_date,
fromText: 'Receber em',
toText: 'Devolver em',
minRange: 5 * day, // Revisar duracao minima
labels: [
{
d: '12/25',
text: 'Natal',
color: 'red'
},
{
d: '1/1',
text: 'A.Novo',
color: 'red'
}
],
invalid: [
'1/1', // 1st of January disabled
'12/25', // Christmas disabled
{d: 'w0'}
],
onSet: function (event, inst) {
// Your custom event handler goes here
mobiscroll.toast({
message: 'Aguarde...',
color: 'success'
});
$('[name=date_from], [name=date_to]').each(function(index){
$(this).val(moment($('#demo').mobiscroll('getVal')[index]).format('YYYY-MM-DD'));
});
setTimeout(function() {
$('form').submit();
}, 900);
}
});
});