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
|
||||
});
|
||||
|
||||
@@ -31,13 +31,10 @@
|
||||
|
||||
<div id="appContainer" class="container" style="display:none;">
|
||||
<h1 class="center-align">TODO</h1>
|
||||
<nav style="display:none;">
|
||||
<nav>
|
||||
<div class="nav-wrapper">
|
||||
<a href="#" class="brand-logo">Menu</a>
|
||||
<a href="#" data-target="mobile-demo" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
||||
<ul class="right hide-on-med-and-down">
|
||||
<li><a id="logoutButton" class="hide-on-med-and-down">Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user