Widget:MattTest: Difference between revisions

Jump to navigation Jump to search
No edit summary
No edit summary
Line 55: Line 55:
$("#screenDate").datepicker({
$("#screenDate").datepicker({
onSelect: function() {
onSelect: function() {
$("#eventDate").datepicker();
checkScreenDate($(this).datepicker("getDate"),$("#eventDate").val());
checkScreenDate($(this).datepicker("getDate"),$("#eventDate").datepicker("getDate"));
}
}
});
});
Line 808: Line 807:
}
}


function checkScreenDate(screen, event){
function checkScreenDate(screen, eventString){
                var dateString = eventString.split("-");
var event = new Date(dateString[2],dateString[1],dateString[0]);
var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate());
var screenMin = new Date(event.getFullYear(),event.getMonth(),event.getDate());
var screenMax = new Date(event.getFullYear(),event.getMonth(),event.getDate() + 5 );
var screenMax = new Date(event.getFullYear(),event.getMonth(),event.getDate() + 5 );

Revision as of 19:31, 30 April 2018