amsul/pickadate.js

Need to Highlight the Date

Opened this issue · 0 comments

function calenderPicker(fromcode, tocode, fromname, toname, onwarddate) {

let search = {
    fromStationCode: fromcode,
    fromStationName: fromname,
    toStationCode: tocode,
    toStationName: toname,
    onwardDate: onwarddate
};
const [pickeryear, pickermonth, pickerday] = onwarddate.split('-').map(Number);

$('#datePickerInput').pickadate({
    format: 'ddd, dd mmm',
	today: false,
	clear: false,
	firstday: 1,
	onOpen: function() {
		$('.picker__holder').removeAttr('inert');
		this.$node.focus();
	},
    onSet: function() {
        const selectedDate = this.get('select', 'yyyy-mm-dd');
        search.onwardDate = selectedDate;
		if(search.onwardDate) {
			location.href = buildSearchUrl(search);
		}
    },
    onClose: function() {
		$('.picker__holder').attr('inert', true);
    }
});

}

here i need to highlight the onwarddate in the pickadate how to do that ?