in

I am following the video on youtube about adding datepicker, but it doesn’t work


I am watching this video to learn integrate a calender to my webapp, but I cant do the same outcome.
here is the video
https://www.youtube.com/watch?v=E0mrZwl1Kow&t=470s&ab_channel=LearnGoogleSpreadsheets

I am now working on the datepicker initialize, the the calender doesn’t show up when I click in it.
here is the HTML

<div class="input-field col s12">
<input id="prefDate" type="text" class="datepicker">
</div>

And here is my initialize js script:

<script>
document.addEventListener('DOMContentLoaded', function() {
var selectBoxes = document.querySelectorAll('select');
M.FormSelect.init(selectBoxes); 
var datePicker1 = document.getElementById('prefDate');
M.Datepicker.init(datePicker1);
});
</script>



Source: https://stackoverflow.com/questions/70715120/i-am-following-the-video-on-youtube-about-adding-datepicker-but-it-doesnt-work

The lightweight and powerful web framework using the new way for Go.Another go the way

An expense tracker made with React