Documentation
Jewish Calendar
Thank you so much for using our Jewish Calendar.
- Version: 1.0
- Author: Jewish Calendar
- Created: October 1, 2010
- Updated: October 10, 2021
If you have any questions that are beyond the scope of this help file, Please feel free to email.
Installation
Follow the steps below to setup Jewish Calendar on your site:
- The main requirement, web site should use jquery version 3.x and jquery ui version 1.12.x You can connect to your site the libraries directly from jquery site:
https://code.jquery.com/jquery-3.2.0.min.js
https://code.jquery.com/ui/1.12.1/jquery-ui.min.js
https://code.jquery.com/ui/1.12.0/themes/smoothness/jquery-ui.css
- You should connect to your website the main files of calendar
Javascript:https://dtpicker.jewishluach.com/Scripts/jewishluach.js
CSS:https://dtpicker.jewishluach.com/Content/calendar/cangas.datepicker.css
- You are good to go for adding calendar to your web site!
Dropdown calendar
The calendar can be created as dropdown near button or input box in the following way:
$("#calendar").jewishluach({
hebrewDateLongContainer: ".hebr-date",
gregorianDateContainer: ".greg-date-text",
yiddishDateContainer: ".yiddish-date",
parsheDateContainer: ".parshe-day",
hebrewDateContainer: ".hebrew-date",
calendarType: $("#calType").val(),
date: sdate,
hideAfterClick: true,
loaded: function () {
$("#test").css("display", "block");
}
});
Options:
Property | Features | Available values | Result of output |
---|---|---|---|
hebrewDateLongContainers |
Output to container the Hebrew Long Date | CSS class |
|
gregorianDateContainer |
Output to container the Gregorian Date | CSS class |
|
yiddishDateContainer |
Output to container the Yiddish Date | CSS class |
|
parsheDateContainer |
Output to container the Parshe Date | CSS class |
|
hebrewDateContainer |
Output to container the Hebrew Date | CSS class |
|
calendarType |
Type of calendar. | Hebrew, English | |
date |
Initial date for calendar | Date string in format mm/dd/yyyy | |
hideAfterClick |
Hide the calendar after selection of date. | true/false | |
loaded |
Hook after full loading of calendar | function |
If you need more information, please visit the example site: https://www.jewishluach.com/dtpicker.html
Background calendar
We can use calendar for retrieving the date in diffident format in background without UI
It can be achieved using the flowing code:
$("#calendar-hidden").jewishluach({
hebrewDateLongContainer: ".hebr-date",
gregorianDateContainer: ".greg-date-text",
yiddishDateContainer: ".yiddish-date",
parsheDateContainer: ".parshe-day",
hebrewDateContainer: ".hebrew-date",
calendarType: $("#calType").val(),
date: sdate,
loaded: function (data) {
$("#test").css("display", "block");
jQuery('.ui-widget-overlay').bind('click', function () {
$('#calendar').hide();
});
$(".greg-date").prop("value", data.date_short);
},
onlyLoadData: true
});
The functionality works at the same way as with UI, but in this case date
will be transform to diffident format of date and UI won't be shown. The result can be received in loaded
hook and all container will be filled by received values.
Options:
Property | Features | Available values | Result of output |
---|---|---|---|
onlyLoadData |
Indicate that should be downloaded only date without using UI | true/false | |
loaded |
The hook for recieving the data | function(data) -
|
Standalone calendar
We can create the static not hidden calendar. We just need to create the same as dropdown just change the hideAfterClick
to false and use container as div
Events
Supporter events for calendar
OnChange event
The onchange event can be used in the same way as usual jquery element. The event is fired when the date was selected:
Example of using:
$("#calendar").on("change", (e, data) => {
$(".greg-date").prop("value", data.date_short);
});
FAQ
A FAQ is a list of frequently asked questions (FAQs) and answers on a particular topic.
Source & Credits
Scripts:
- jQuery - http://www.jquery.com/
- jQuery UI - https://jqueryui.com/
Support
If this documentation doesn't answer your questions, So, Please send us Email