jQuery UI Widgets › Forums › Editors › Calendar › Delete Calendar Special Dates
Tagged: calendar, delete, jqxCalendar, special date
This topic contains 1 reply, has 2 voices, and was last updated by Dimitar 11 years, 8 months ago.
Viewing 2 posts - 1 through 2 (of 2 total)
-
Author
-
Hi guys
how i can delete the calendar special date?
Hello jiahuai,
Here is an example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/gettheme.js"></script> <script type="text/javascript" src="../../scripts/jquery-1.8.3.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.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></head><body> <div id='content'> <script type="text/javascript"> $(document).ready(function () { var theme = getDemoTheme(); // Create calendar. $("#jqxWidget").jqxCalendar({ enableTooltips: true, width: 220, height: 220, theme: theme }); // Create Date objects. var date1 = new Date(); var date2 = new Date(); var date3 = new Date(); date1.setDate(5); date2.setDate(15); date3.setDate(16); // Add special dates by invoking the addSpecialDate method. $("#jqxWidget").jqxCalendar('addSpecialDate', date1, '', 'Special Date1'); $("#jqxWidget").jqxCalendar('addSpecialDate', date2, '', 'Special Date2'); $("#jqxWidget").jqxCalendar('addSpecialDate', date3, '', 'Special Date3'); $("#remove").click(function () { var sD = $("#jqxWidget").jqxCalendar('specialDates'); sD.splice(0, 1); $("#jqxWidget").jqxCalendar({ specialDates: sD }); }); }); </script> <div id='jqxWidget'> </div> <button id="remove"> Remove first special date</button> </div></body></html>
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.