ASP .NET Core MVC Documentation

Getting Started

jqxCalendar represents a UI component which display a month calendar. Users can easily select a date by using a mouse or touch.

Every UI widget from jQWidgets toolkit needs its JavaScript files to be included in order to work properly.

Include all required javascript and css files

jqxCalendar requires the following files:

  • CSS

  • jqx.base.css
  • Javascript

  • jqxcore.js
  • jqxdatetimeinput.js
  • jqxcalendar.js
  • jqxtooltip.js
  • globalize.js
The next step is to create html element within the body of the html document and add the initialization attributes.
<script src="~/jqwidgets/jqxcalendar.js"></script>
<script src="~/jqwidgets/jqxdatetimeinput.js"></script>
<script src="~/jqwidgets/jqxtooltip.js"></script>
<script src="~/jqwidgets/globalization/globalize.js"></script>
@{
DateTime date = new DateTime(2017, 9, 20);
DateTime min = new DateTime(2002, 9, 20);
DateTime max = new DateTime(2018, 9, 20);
}
<jqx-calendar back-text="Back" width="200" height="200" min="min" max="max" value="date"></jqx-calendar>

To call a function(method), you need to pass the method name and parameters(if any) in the jqxCalendar’s instance.
<script src="~/jqwidgets/jqxcalendar.js"></script>
<script src="~/jqwidgets/jqxdatetimeinput.js"></script>
<script src="~/jqwidgets/jqxtooltip.js"></script>
<script src="~/jqwidgets/globalization/globalize.js"></script>
@{
DateTime date = new DateTime(2017, 9, 20);
DateTime min = new DateTime(2002, 9, 20);
DateTime max = new DateTime(2018, 9, 20);
}
<jqx-calendar width="200" height="200" min="min" max="max" value="date" instance="getInstance()"></jqx-calendar>
@section scripts {
<script type="text/javascript">
function getInstance(instance) {
instance["today"]();
}
</script>
}
To bind to an event of a UI widget, you can use on-event-type syntax. The example code below demonstrates how to bind to an event.
<script src="~/jqwidgets/jqxcalendar.js"></script>
<script src="~/jqwidgets/jqxdatetimeinput.js"></script>
<script src="~/jqwidgets/jqxtooltip.js"></script>
<script src="~/jqwidgets/globalization/globalize.js"></script>
@{
DateTime date = new DateTime(2017, 9, 20);
DateTime min = new DateTime(2002, 9, 20);
DateTime max = new DateTime(2018, 9, 20);
}
<jqx-calendar on-back-button-click="eventHandler()"></jqx-calendar>
@section scripts {
<script type="text/javascript">
function eventHandler(event) {
}
</script>
}

Basic Sample