Skip to content

Examples ​

patrojs in six small, real-world apps. Each one is live: use it, and the panel beside it shows exactly what the components returned. The code is underneath.

ExampleWhat it shows
Festival calendarA BS Calendar with this season's festivals: dayClassName, dayContent, dayLabel, weekendDays, onMonthChange and the Today button
Registration formAn editable, clearable Datepicker in react-hook-form's Controller, with a minimum age checked by addBsYears
Hotel bookingA two-month range with booked nights (isDateDisabled, excludeDisabled), a minimum stay, presets and a native form post
बिदा निवेदन (leave form)A form entirely in Nepali that counts working days with addBsDays and getBsWeekday, and submits BS dates
Reschedule in a dialogA Datepicker inside a modal <dialog> through portalContainer; Escape closes the picker first
Date converterad2Bs, bs2Ad, formatBsDate, addBsMonths and bsDaysBetween, with no calendar

Released under the MIT License.