0.1.0 • Published 5 years ago

nw-calendar v0.1.0

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

Nw Calendar

Table of contents

About

nw-calendar is an angular & ionic library,, supports week and month views, and more than 100 locales

Getting Started

First install through npm:

npm install nw-calendar

Next import the calendar module into your app module:

	@NgModule({  
	  declarations: [  
	    AppComponent  
	  ],  
	  imports: [  
		 BrowserModule,    
		 NwCalendarModule  
	 ],  
	  providers: [],  
	  bootstrap: [AppComponent]  
	})  
	export class AppModule { }

Finally, use the nw-calendar component in your template:

	<nw-calendar></nw-calendar>

then enjoy :)

Examples

  1. Month View default

    ```html
    <nw-calendar viewType="month"></nw-calendar>
    ```
  2. Week View

    ```html
    <nw-calendar viewType="week"></nw-calendar>
    ```

API

Properties

PropertyDescriptionValid ValuesDefault
viewTypethe view type of calendar'week' , 'month''month'
localethe default language used in calendarLocales'en'
dirthe direction of calendar'ltr' , 'rtl''ltr'
(selectedDate)Selected DateDate
rangeAvailable dates range to allow selection within{start?: Date , end?: Date }
isDisableda function returns a boolean to disable specific dates regarding to custom conditions() => boolean(date:Date) => { return false; }

Events

PropertyDescriptionData
(navigate)Navigation Event handler{start?: Date , end?: Date }
(selectedDateChange)On Date select Event HandlerDate

Locales

LocaleLanguage
enEnglish
afAfrikaans
ar-dzArabic (Algeria)
ar-kwArabic (Kuwait)
ar-lyArabic (Libya)
ar-maArabic (Morocco)
ar-saArabic (Saudi Arabia)
ar-tnArabic (Tunisia)
arArabic
azAzerbaijani
beBelarusian
bgBulgarian
bmBambara
bnBengali
boTibetan
brBreton
bsBosnian
caCatalan
csCzech
cvChuvash
cyWelsh
daDanish
de-atGerman (Austria)
de-chGerman (Switzerland)
deGerman
dvDivehi
elGreek
en-auEnglish (Australia)
en-caEnglish (Canada)
en-gbEnglish (United Kingdom)
en-ieEnglish (Ireland)
en-nzEnglish (New Zealand)
eoEsperanto
es-doSpanish (Dominican Republic)
es-usSpanish (United States)
esSpanish
etEstonian
euBasque
faPersian
fiFinnish
foFaroese
fr-caFrench (Canada)
fr-chFrench (Switzerland)
frFrench
fyWestern Frisian
gdScottish Gaelic
glGalician
gom-latngom (Latin)
guGujarati
heHebrew
hiHindi
hrCroatian
huHungarian
hy-amArmenian (Armenia)
idIndonesian
isIcelandic
itItalian
jaJapanese
jvJavanese
kaGeorgian
kkKazakh
kmKhmer
knKannada
koKorean
kyKirghiz
lbLuxembourgish
loLao
ltLithuanian
lvLatvian
meme
miMaori
mkMacedonian
mlMalayalam
mrMarathi
ms-myMalay (Malaysia)
msMalay
mtMaltese
myBurmese
nbNorwegian Bokmål
neNepali
nl-beDutch (Belgium)
nlDutch
nnNorwegian Nynorsk
pa-inPunjabi (India)
plPolish
pt-brPortuguese (Brazil)
ptPortuguese
roRomanian
ruRussian
sdSindhi
seNorthern Sami
siSinhala
skSlovak
slSlovenian
sqAlbanian
sr-cyrlSerbian (Cyrillic)
srSerbian
ssSwati
svSwedish
swSwahili
taTamil
teTelugu
tetTetum
thThai
tl-phTagalog (Philippines)
tlhKlingon
trTurkish
tzltzl
tzm-latntzm (Latin)
tzmtzm
ukUkrainian
urUrdu
uz-latnUzbek (Latin)
uzUzbek
viVietnamese
x-pseudox-pseudo
yoYoruba
zh-cnChinese (China)
zh-hkChinese (Hong Kong SAR China)
zh-twChinese (Taiwan)

License

MIT

developed with ❤ by Ahmed M. Elewa