Set default date for datepicker to tomorrow and update navigation visibility
This commit is contained in:
@@ -26,9 +26,16 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
// Initialize Materialize components
|
||||
M.Sidenav.init(sidenav);
|
||||
|
||||
// Calculate tomorrow's date
|
||||
const today = new Date();
|
||||
const tomorrow = new Date(today);
|
||||
tomorrow.setDate(today.getDate() + 1);
|
||||
|
||||
// Initialize datepicker with tomorrow as the default date
|
||||
M.Datepicker.init(document.querySelectorAll('.datepicker'), {
|
||||
format: 'yyyy-mm-dd',
|
||||
defaultDate: new Date(),
|
||||
defaultDate: tomorrow,
|
||||
setDefaultDate: true,
|
||||
firstDay: 1
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user