{"index.ts":"import { Calendar, RenderDayCellEventArgs, ChangedEventArgs } from '@syncfusion/ej2-calendars';\n/**\n * Special calendar sample\n */\n\n\n let calendar: Calendar = new Calendar({\n renderDayCell: customDates, change: valueChange\n });\n calendar.appendTo('#calendar');\n\nfunction customDates(args: RenderDayCellEventArgs): void {\n if (args.date.getDate() === 10) {\n let span: HTMLElement;\n span = document.createElement('span');\n span.setAttribute('class', 'e-icons highlight');\n args.element.appendChild(span);\n args.element.setAttribute('title', 'Birthday !');\n args.element.setAttribute('data-val', 'Birthday !');\n }\n if (args.date.getDate() === 15) {\n args.element.className = 'special';\n args.element.setAttribute('title', 'Farewell');\n args.element.setAttribute('data-val', 'Farewell !');\n }\n if (args.date.getDate() === 20) {\n args.element.className = 'daycell';\n }\n}\nfunction valueChange(args: ChangedEventArgs): void {\n let title: string = (<HTMLElement>event.currentTarget).querySelector('.e-link').getAttribute('data-val');\n title = title == null ? '' : ' ( ' + title + ' )';\n (<HTMLInputElement>document.getElementById('date_label')).textContent = 'Selected Value: ' + args.value.toLocaleDateString() + title;\n}","index.html":"<html><head>\n <link href=\"http://ej2ci.syncfusion.com/production/demos/styles/material.css\" rel=\"stylesheet\">\n <script src=\"https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.38/system.js\"></script>\n <script src=\"systemjs.config.js\"></script>\n</head>\n<body>\n<div class=\"col-lg-12 control-section\">\n <div class=\"control_wrapper\">\n <div id=\"container\">\n <div id=\"calendar\"></div><br>\n </div>\n <span id=\"date_label\"> Selected Value: </span>\n </div>\n</div>\n\n<style>\n .control_wrapper #container {\n min-height: 310px;\n }\n \n .e-bigger .control_wrapper #container {\n min-height: 400px;\n }\n \n #date_label {\n display: block;\n width: 248px;\n color: rgba(0, 0, 0, 0.58);\n }\n \n .control_wrapper {\n max-width: 350px;\n margin: 0 auto;\n }\n \n span.e-icons.highlight {\n margin-top: -13px;\n display: block;\n margin-left: 4px;\n }\n \n span.e-icons.highlight,\n span.e-icons.highlight:before {\n color: rgb(0, 0, 255);\n }\n \n span.e-icons.highlight:before {\n content: \"\\e865\";\n vertical-align: middle;\n margin-right: 3px;\n font-size: 4px;\n position: relative;\n top: -1px;\n font-weight: normal;\n }\n \n .e-bigger.e-calendar span.e-icons.highlight:before,\n .e-bigger .e-calendar span.e-icons.highlight:before {\n top: -3px;\n }\n \n .e-selected span.e-icons.highlight:before {\n color: #fff;\n }\n \n span.e-icons.highlight,\n .e-calendar .e-content span.special,\n .e-calendar .e-content span.daycell {\n font-weight: bold;\n }\n \n .e-calendar .e-content span.special {\n color: red;\n }\n \n .e-calendar .e-content span.daycell {\n color: #ff9e00;\n }\n</style>\n\n</body></html>","systemjs.config.js":"System.config({\n transpiler: \"typescript\",\n typescriptOptions: {\n compilerOptions: {\n target: \"umd\",\n module: \"commonjs\",\n moduleResolution: \"node\",\n emitDecoratorMetadata: true,\n experimentalDecorators: true\n }\n },\n paths: {\n \"syncfusion:\": \"http://ej2ci.syncfusion.com/packages/production/\"\n },\n map: {\n main: \"index.ts\",\n typescript: \"https://unpkg.com/
[email protected]/lib/typescript.js\",\n 'plugin-json':'https://cdnjs.cloudflare.com/ajax/libs/systemjs-plugin-json/0.3.0/json.min.js',\n \"@syncfusion/ej2-base\": \"syncfusion:ej2-base/dist/ej2-base.umd.min.js\",\n \"@syncfusion/ej2-buttons\": \"syncfusion:ej2-buttons/dist/ej2-buttons.umd.min.js\",\n \"@syncfusion/ej2-calendars\": \"syncfusion:ej2-calendars/dist/ej2-calendars.umd.min.js\",\n \"@syncfusion/ej2-charts\": \"syncfusion:ej2-charts/dist/ej2-charts.umd.min.js\",\n \"@syncfusion/ej2-data\": \"syncfusion:ej2-data/dist/ej2-data.umd.min.js\",\n \"@syncfusion/ej2-grids\": \"syncfusion:ej2-grids/dist/ej2-grids.umd.min.js\", \n \"@syncfusion/ej2-inputs\": \"syncfusion:ej2-inputs/dist/ej2-inputs.umd.min.js\", \n \"@syncfusion/ej2-lists\": \"syncfusion:ej2-lists/dist/ej2-lists.umd.min.js\",\n \"@syncfusion/ej2-navigations\": \"syncfusion:ej2-navigations/dist/ej2-navigations.umd.min.js\", \n \"@syncfusion/ej2-popups\": \"syncfusion:ej2-popups/dist/ej2-popups.umd.min.js\", \n \"@syncfusion/ej2-circulargauge\": \"syncfusion:ej2-circulargauge/dist/ej2-circulargauge.umd.min.js\", \n },\n meta: { \n '*.json': { loader: 'plugin-json' }\n }\n});\n\nSystem.import('index.ts').catch(console.error.bind(console));"}
0 commit comments