This is a custom calendar created using JavaScript and moment.js.
https://calendar-customer.netlify.app/
- This calendar allows users to choose a
startDateand anendDate. - When a user selects a
startDate, it is displayed in the "start date" field above the calendar, and the same applies to theendDate. - Once both the
startDateandendDateare selected, they are displayed in their respective fields above the calendar, and the search button changes color to green. - When both the
startDateandendDateare selected, the calendar will maintain theirhighlighted dateseven if a user navigates back and forth between different months, ensuring that the exactly selected dates remain highlighted and visible.
- It enforces the restriction that users cannot select any date in the past.
- If a user selects a
startDateand subsequently chooses anendDatethat precedes the previously selectedstartDate, theendDateis replaced by the initially selectedstartDate. This behavior prevents users from selecting dates in reverse order, as anendDatecannot be earlier than thestartDate. - The
Previous button iconis disabled and hidden when a user clicks it and is about to enter the past month, ensuring that users cannot navigate to earlier days or months in the past when they are in close proximity to the present date. It is enabled again when they click theNext buttonand return to the present.
- JavaScript
- Moment.js
- CSS
- Tailwind CSS
Both starDate and endDate selected and highlighting date range



