Let's Build a Datepicker: 05 - Displaying the correct year and month range (Javascript, ES6)

Опубликовано: 20 Май 2026
на канале: Pete B
1,726
10

Code a custom made, highly interactive and scalable datepicker with me using HTML, CSS and vanilla Javascript (JS).

In this lesson we are going to import moment.js and display the correct year and month range in our datepicker.

UPDATES to new datetime library will go here:
[...]

Github link to lesson: https://github.com/blntptr/datepicker...
To import moment, put this in a pair of script tags: src="https://cdnjs.cloudflare.com/ajax/lib..."


Website: https://peterbalint.hu/en/
Twitter:   / blntptr  

Music: Clang - Yung Logos (YouTube Studio)
Thumbnail datepicker icon: Freepik https://www.flaticon.com/authors/freepik