I’m trying to read dates from a text file for example - '08/12/2017
'
$.get('disableDays.txt', function(data) {
var disableSpecificDays = data;
The values are getting read. I'm then trying to disable dates in the datepicker based on text file entries
It works when I set the value like this:
addDates: ['08/12/2017', '10/14/2017'],
This doesn’t work :
addDates:+ disableSpecificDays,
I’ve tried setting as array but I know jquery is not same as array and like:
addDates:+ $('#disableSpecificDays').val,
var today = new Date();
var y = today.getFullYear();
var dates = $('#full-year').multiDatesPicker({
//addDates: ['08/12/2017', '10/14/2017'],
//addDates:+ $('#disableSpecificDays').val,
addDates:+ disableSpecificDays,
numberOfMonths: [3,4],
defaultDate: '1/1/'+y
beforeShowDay: $.datepicker.noWeekends
});
What I am doing wrong?
Can I write back to the text file with:
file_put_contents($file, $current);