https://github.com/riverside/calendarjs
:calendar: Javascript calendar and datepicker component
https://github.com/riverside/calendarjs
calendar datepicker datepicker-component javascript
Last synced: 4 months ago
JSON representation
:calendar: Javascript calendar and datepicker component
- Host: GitHub
- URL: https://github.com/riverside/calendarjs
- Owner: riverside
- License: mit
- Created: 2015-10-15T19:53:27.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-06-04T08:51:39.000Z (about 2 years ago)
- Last Synced: 2025-01-08T16:21:39.798Z (6 months ago)
- Topics: calendar, datepicker, datepicker-component, javascript
- Language: JavaScript
- Homepage:
- Size: 44.9 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGE.txt
- License: LICENSE.md
Awesome Lists containing this project
README
# CalendarJS
### Introduction
A simple but yet powerful calendar and datepicker component written in javascript with full featured API.
### Example
```
var cal_1 = new Calendar({
element: 'inlineCalendar',
inline: true,
months: 3,
dateFormat: 'm/d/Y',
onSelect: function (element, selectedDate, date, cell) {
//do something
}
});```
### OptionsOption | Type | Default
------- | ------ |-----------------------------
**year** | *Number* | new Date().getFullYear()
**month** | *Number* | new Date().getMonth()
**dayNames** | *Array* | ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]
**dayNamesFull** | *Array* | ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
**monthNames** | *Array* | ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
**monthNamesFull** | *Array* | ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
**startDay** | *Number* | 0
**weekNumbers** | *Boolean* | false
**selectOtherMonths** | *Boolean* | false
**showOtherMonths** | *Boolean* | true
**showNavigation** | *Boolean* | true
**months** | *Numeric* | 1
**inline** | *Boolean* | false
**disablePast** | *Boolean* | false
**dateFormat** | *String* | 'Y-m-d'
**position** | *String* | 'bottom'
**minDate** | *Date* | null
**onBeforeOpen** | *Function* | function () {}
**onBeforeClose** | *Function* | function () {}
**onOpen** | *Function* | function () {}
**onClose** | *Function* | function () {}
**onSelect** | *Function* | function () {}
**onBeforeShowDay** | *Function* | function () { return [true, '']; }### Version
1.5### License
Licensed under the **MIT** license.