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

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">

And here is my initialize js script:

document.addEventListener('DOMContentLoaded', function() {
var selectBoxes = document.querySelectorAll('select');
var datePicker1 = document.getElementById('prefDate');


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

An expense tracker made with React