0.0.41 • Published 3 months ago

react-ad-bs-calendar v0.0.41

Weekly downloads
-
License
-
Repository
github
Last release
3 months ago

react-ad-bs-calendar

react-ad-bs-calendar is a React package offering a bilingual calendar display supporting both AD and BS (Nepali) date systems, with seamless toggling between English and Nepali languages for enhanced user accessibility.

Installation

npm install react-ad-bs-calendar

Usage

Here's an example of basic usage:

import Calendar from 'react-ad-bs-calendar';
import 'react-ad-bs-calendar/dist/style.css';

function MyApp() {
  return (
    <div>
      <Calendar />
    </div>
  );
}

Custom styling

If you want to use default react-ad-bs-calendar styling to build upon it, you can import react-ad-bs-calendar's styles by using:

import 'react-ad-bs-calendar/dist/style.css';

User guide

Calendar

Displays a calendar in AD and BS.

Props
PropDefault ValueDescriptionExample Value
mode"AD"Calendar mode (AD or BS)"AD"
language"EN"Calendar language (English or Nepali)"EN"
value""Initial selected date in "YYYY-MM-DD" format"2024-01-17"
onClickDate(value, date_ad) => {}Callback function on date click-
onChangeYear(date_ad,start_date_ad,end_date_ad) => {}Callback function on year change-
onChangeMonth(date_ad,start_date_ad,end_date_ad) => {}Callback function on month change-
maxDate""Maximum allowed date in "YYYY-MM-DD" format"2050-12-31"
minDate""Minimum allowed date in "YYYY-MM-DD" format"2000-01-01"
weekends0, 6Array of weekend days (0 = Sunday, 1 = Monday, ..., 6 = Saturday)0, 6
tileContent(date_ad) => React.ReactNodeCustom content for a date tile(date_ad) => {date_ad}
events[]Array of {name?:string,date:Date,type='holiday']}{name?:"Dashain",type:"holiday",date:new Date()}

License

The MIT License.

Author

Araj Chalise

0.0.40

3 months ago

0.0.41

3 months ago

0.0.39

3 months ago

0.0.37

4 months ago

0.0.38

4 months ago

0.0.35

4 months ago

0.0.36

4 months ago

0.0.20

4 months ago

0.0.21

4 months ago

0.0.22

4 months ago

0.0.23

4 months ago

0.0.25

4 months ago

0.0.16

4 months ago

0.0.17

4 months ago

0.0.18

4 months ago

0.0.19

4 months ago

0.0.30

4 months ago

0.0.31

4 months ago

0.0.32

4 months ago

0.0.33

4 months ago

0.0.34

4 months ago

0.0.26

4 months ago

0.0.27

4 months ago

0.0.28

4 months ago

0.0.15

4 months ago

0.0.14

4 months ago

0.0.13

4 months ago

0.0.12

4 months ago

0.0.11

4 months ago

0.0.10

4 months ago

0.0.9

4 months ago

0.0.8

4 months ago

0.0.6

4 months ago

0.0.5

4 months ago

0.0.4

4 months ago

0.0.3

4 months ago

0.0.2

4 months ago

0.0.1

4 months ago

1.0.7

4 months ago

1.0.6

4 months ago

1.0.5

4 months ago

1.0.4

4 months ago

1.0.3

4 months ago

1.0.2

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago