1.2.4 • Published 12 months ago

tuo-light-calendar v1.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

tuo-light-calendar (react)

light calendar

Screenshot

light-calendar

Development

npm install
yarn install

npm run dev
yarn dev

Install

npm install tuo-light-calendar
yarn add tuo-light-calendar

Usage

const [date, setDate] = useState<Date>(new Date());

return (
  <LightCalendar
    selectedDate={date}
    onDateChange={setDate}
  />
)

API

LightCalendar props

namedescriptiontypedefalut
languagelanguage of header and day text'en' / 'ko''en'
selectedDatecurrently selected dateDate
onDateChangechanging selectedDate when selecting a date(date:Date) => void
disableDateClickdisable selecting a datebooleanfalse
disableFuturedisable moving to future months from the current monthbooleanfalse
containerSizesize of the container including the header and calendar{width: string, height: string}{width: '100%', height: '100%'}
cellSizewidth and height of the selection area and today's date area (px)number40
cellColorbackground color of each of the selection area and today's date area{today: stirng, selected: string}{today: '#EDEDED', selected: '#ADD8E6'}
selectedFontColorfont color of the selected datestring'#333333'
classNamesadditional css class of calendar container and the text for day and date{contanier: stirng, day?: string, current?: string, date?: string, differentMonth?: string, sunday?: string}
customHeadercustomize the header(dateText: string, handleMonth: (direction: 'prev''next') => void, clickToday: () => void, futureDisabled: boolean) => JSX.Element
1.2.4

12 months ago

1.2.3

12 months ago

1.2.2

12 months ago

1.2.1

12 months ago

1.1.2

12 months ago

1.2.0

12 months ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago