|
Calendar Widget
Calendar widget is very common user interface. It helps to pick a date or a date range. Calendar widget in Nedil Widgets provides a plenty of configuring options.
Basic Usage $.domLoaded(function() {
$.get("#call").widget("calendar", CONFIG_JSON );
}
Configuring Options
It contains array of JSON objects. The properties are mentioned below.
Methods
Calendar Widget Examples Example 1
JS
HTML
$.domLoaded( function() {
$.get("#cal1").widget("calendar");
$.get("#cal2").widget("calendar", {
def : "12/22/1987"
});
});
Result
Example 2
JS
HTML
$.domLoaded( function() {
$.get("#cal1").widget("calendar",{
calendars : 3
});
});
Result
Example 3
JS
HTML
$.domLoaded( function() {
$.get("#cal1").widget("calendar",{
first : 2
});
});
Result
Example 4
JS
HTML
$.domLoaded( function() {
$.get("#cal1").widget("calendar",{
range : true
});
$.get("#cal2").widget("calendar",{
calendars : 3,
range : true
});
});
Result
Example 5
JS
HTML
$.domLoaded( function() {
$.get("#cal1").widget("calendar",{
disable : new Date()
});
$.get("#cal2").widget("calendar",{
disable : "12/15/1987",
def : "12/22/1987"
});
});
Result
Example 6
JS
HTML
$.domLoaded( function() {
$.get("#cal1").widget("calendar", {
calendars : 1,
input : true
});
$.get("#cal2").widget("calendar", {
calendars : 1,
input : true,
range : true
});
$.get("#cal3").widget("calendar", {
calendars : 3,
input : true,
range : true
});
});
Result
Example 7
JS
HTML
$.domLoaded( function() {
var cal1, cal2;
cal1 = $.get("#cal1").widget("calendar");
cal2 = $.get("#cal2").widget("calendar",{
range : true
});
$.get("#sel1").on("click", function() {
alert(cal1.getDate());
});
$.get("#sel2").on("click", function() {
alert(cal2.rangeStart());
});
$.get("#sel3").on("click", function() {
alert(cal2.rangeEnd());
});
$.get("#sel4").on("click", function() {
alert(cal2.noOfSelectedDays());
});
});
Result
Example 8
JS
HTML
$.domLoaded( function() {
var cal1;
cal1 = $.get("#cal1").widget("calendar",{
display : false
});
$.get("#sel1").on("click", function() {
cal1.show();
});
$.get("#sel2").on("click", function() {
cal1.hide();
});
});
Result
| |||||||||||||||||||||||||||||||||||||||||||||||
