UNPKG

jqwidgets-framework

Version:

jQWidgets is an advanced jQuery, Angular, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.

52 lines (43 loc) 2.51 kB
<!DOCTYPE html> <html lang="en"> <head> <title id='Description'>Calendar Custom Element Special</title> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1 minimum-scale=1" /> <meta name="description" content="This example shows how to add special dates to the Custom Element Calendar." /> <link rel="stylesheet" href="../jqwidgets/styles/jqx.base.css" type="text/css" /> <link rel="stylesheet" href="../styles/demos.css" type="text/css" /> <script type="text/javascript" src="../scripts/webcomponents-lite.min.js"></script> <script type="text/javascript" src="../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../jqwidgets/jqxcore.elements.js"></script> <script type="text/javascript" src="../jqwidgets/jqxdatetimeinput.js"></script> <script type="text/javascript" src="../jqwidgets/jqxcalendar.js"></script> <script type="text/javascript" src="../jqwidgets/jqxtooltip.js"></script> <script type="text/javascript" src="../jqwidgets/globalization/globalize.js"></script> <script type="text/javascript" src="../scripts/demos.js"></script> <script type="text/javascript"> var date1 = new Date(); var date2 = new Date(); var date3 = new Date(); date1.setDate(5); date2.setDate(15); date3.setDate(16); JQXElements.settings['calendarSettings'] = { enableTooltips: true } window.onload = function() { var myCalnedar = document.querySelector('jqx-calendar'); myCalnedar.addSpecialDate(date1); myCalnedar.addSpecialDate(date2); myCalnedar.addSpecialDate(date3); } </script> </head > <body> <div class="example-description"> In this demo it is demonstrated how to add special dates to the Custom element Calendar widget. You can add any special date to the Calendar by using the addSpecialDate method. When you invoke the method, you need to pass three parameters to it - Date object( the special date ), class (optional parameter which represents the css class name) and tooltip (optional parameter which displayes additional information about the special date when the user hovers it). </div> <jqx-calendar settings="calendarSettings"></jqx-calendar> </body> </html >