@midseelee/date-fns-buddhist-adapter
v1.0.7
Published
date-fns adapter with Buddhist years functionality
Maintainers
Readme
@midseelee/date-fns-buddhist-adapter
Forked from ascendcorp/date-fns-buddhist-adapter
date-fns adapter with Buddhist years functionality compatible with MUI-X date-picker.
Installation
npm install @midseelee/date-fns-buddhist-adapter [email protected] @date-io/[email protected]
# or
pnpm add @midseelee/date-fns-buddhist-adapter [email protected] @date-io/[email protected]
# or
bun add @midseelee/date-fns-buddhist-adapter [email protected] @date-io/[email protected]Peer Dependencies
This package requires the following peer dependencies:
@mui/material^7.3.4@mui/x-date-pickers^8.14.1react^19.2.0
Usage
import { LocalizationProvider } from '@mui/x-date-pickers'
import { DatePicker } from '@mui/x-date-pickers/DatePicker'
import { th } from 'date-fns/locale'
import AdapterDateFns from '@midseelee/date-fns-buddhist-adapter'
function App() {
return (
<LocalizationProvider
dateAdapter={AdapterDateFns}
adapterLocale={th}
>
<DatePicker label="วันที่ (พ.ศ.)" />
</LocalizationProvider>
)
}Credits
This package is forked from ascendcorp/date-fns-buddhist-adapter
Special Thanks
- Ascendcorp - Original implementation
- mui-x - MUI X Date Pickers
- date-fns-be - Buddhist Era utilities
License
MIT License
- Copyright (c) 2023 Ascendcorp (original)
- Copyright (c) 2025 midseelee (fork modifications)
