Documentation
Styling and Appearance
jQWidgets uses a pair of CSS files - jqx.base.css and jqx.[theme name].css. The base stylesheet creates the styles related to the widget's layout like margin, padding, border-width, position. The second css file applies the widget's colors and backgrounds. The jqx.base.css should be included before the second CSS file.Below is the list of CSS classes used by jqxScheduler:
- jqx-scheduler - applying to the root jqxScheduler element.
- jqx-widget - applying to the root jqxScheduler element.
- jqx-widget-content - applying to the root jqxScheduler element.
- jqx-rc-all - applying to the root jqxScheduler element.
- jqx-cell - applying to the jqxScheduler cells.
- jqx-widget-header - applying to the jqxScheduler column header, toolbar, legend.
- jqx-scheduler-toolbar - applying to the jqxScheduler toolbar.
- jqx-icon-arrow-left - applying to the jqxScheduler left navigation arrow.
- jqx-icon-arrow-right - applying to the jqxScheduler right navigation arrow.
- jqx-scheduler-selected-appointment - applying to a selected appointment.
- jqx-scheduler-appointment-resize-indicator - applying to the appointment elements. Displays a resize handler.
- jqx-scheduler-cell-focus - applying to focused cell.
- jqx-scheduler-feedback-appointment - applying to the appointment and the feedback element of an appointment which is
displayed when the appointment is being dragged or resized. - jqx-scheduler-feedback-drag-appointment - applying to the feedback element of an appointment which is displayed when the appointment is being dragged or resized.
- jqx-scheduler-time-column - applying to the time ruler's column.
- jqx-scheduler-cell-hover - applying to hovered cell.
- jqx-fill-state-hover - applying to hovered cell.
- jqx-scheduler-cell-selected - applying to selected cell(s).
- jqx-fill-state-pressed - applying to selected cell(s).
- jqx-scheduler-month-weekend-cell - applying to weekend cells.
- jqx-scheduler-month-cell - applying to cells in the month view.
- jqx-scheduler-month-outer-cell - applying to cells in the month view which are not from the current month.
- jqx-scheduler-all-day-cell - applying to the cells in the all day area.
- jqx-scheduler-time-column-header-cell - applying to the cell above the time ruler's column.
- jqx-scheduler-work-time-cell - applying to cells in the work time area.
- jqxjqx-scheduler-not-work-time-cell - applying to cells out of the work time area.
When you create a custom style with colors and backgrounds for jqxScheduler, you need to do the following:
- Add the above CSS classes related to jqxScheduler
- After each CSS class, add your theme name.
For example: jqx-Scheduler-summer - To apply your custom style to jqxScheduler, you need to set its 'theme' property(option) to point to your theme name string.
- The sample below demonstrates how to set the 'Summer' theme to jqxScheduler.
<!DOCTYPE html><html lang="en"><head> <title id='Description'>jqxScheduler widget displays a set of Appointments in Day, Week, Month, Timeline Day, Timeline Week and Timeline Month views </title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.energyblue.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../scripts/demos.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxscrollbar.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdata.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdate.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxscheduler.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxscheduler.api.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdatetimeinput.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxmenu.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/jqxwindow.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcheckbox.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxlistbox.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxdropdownlist.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxnumberinput.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxradiobutton.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxinput.js"></script> <script type="text/javascript" src="../../jqwidgets/globalization/globalize.js"></script> <script type="text/javascript" src="../../jqwidgets/globalization/globalize.culture.de-DE.js"></script> <script type="text/javascript"> $(document).ready(function () { var appointments = new Array(); var appointment1 = { id: "id1", description: "George brings projector for presentations.", location: "", subject: "Quarterly Project Review Meeting", calendar: "Room 1", start: new Date(2015, 10, 23, 9, 0, 0), end: new Date(2015, 10, 23, 16, 0, 0) } var appointment2 = { id: "id2", description: "", location: "", subject: "IT Group Mtg.", calendar: "Room 2", start: new Date(2015, 10, 24, 10, 0, 0), end: new Date(2015, 10, 24, 15, 0, 0) } var appointment3 = { id: "id3", description: "", location: "", subject: "Course Social Media", calendar: "Room 3", start: new Date(2015, 10, 27, 11, 0, 0), end: new Date(2015, 10, 27, 13, 0, 0) } var appointment4 = { id: "id4", description: "", location: "", subject: "New Projects Planning", calendar: "Room 2", start: new Date(2015, 10, 23, 16, 0, 0), end: new Date(2015, 10, 23, 18, 0, 0) } var appointment5 = { id: "id5", description: "", location: "", subject: "Interview with James", calendar: "Room 1", start: new Date(2015, 10, 25, 15, 0, 0), end: new Date(2015, 10, 25, 17, 0, 0) } var appointment6 = { id: "id6", description: "", location: "", subject: "Interview with Nancy", calendar: "Room 4", start: new Date(2015, 10, 26, 14, 0, 0), end: new Date(2015, 10, 26, 16, 0, 0) } appointments.push(appointment1); appointments.push(appointment2); appointments.push(appointment3); appointments.push(appointment4); appointments.push(appointment5); appointments.push(appointment6); // prepare the data var source = { dataType: "array", dataFields: [ { name: 'id', type: 'string' }, { name: 'description', type: 'string' }, { name: 'location', type: 'string' }, { name: 'subject', type: 'string' }, { name: 'calendar', type: 'string' }, { name: 'start', type: 'date' }, { name: 'end', type: 'date' } ], id: 'id', localData: appointments }; var adapter = new $.jqx.dataAdapter(source); $("#scheduler").jqxScheduler({ date: new $.jqx.date(2015, 11, 23), width: 700, height: 500, source: adapter, view: 'weekView', theme: 'energyblue', showLegend: true, ready: function () { $("#scheduler").jqxScheduler('ensureAppointmentVisible', 'id1'); }, resources: { colorScheme: "scheme05", dataField: "calendar", source: new $.jqx.dataAdapter(source) }, appointmentDataFields: { from: "start", to: "end", id: "id", description: "description", location: "place", subject: "subject", resourceId: "calendar" }, views: [ 'dayView', 'weekView', 'monthView' ] }); }); </script><script async src="https://www.googletagmanager.com/gtag/js?id=G-2FX5PV9DNT"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-2FX5PV9DNT');</script></head><body class='default'> <div id="scheduler"></div></body></html>