{"id":13678,"date":"2025-04-10T18:18:48","date_gmt":"2025-04-10T15:18:48","guid":{"rendered":"https:\/\/dhtmlx.com\/blog\/?p=13678"},"modified":"2025-04-10T19:18:19","modified_gmt":"2025-04-10T16:18:19","slug":"frontend-setup-integrating-dhtmlx-booking-scheduler","status":"publish","type":"post","link":"https:\/\/dhtmlx.com\/blog\/frontend-setup-integrating-dhtmlx-booking-scheduler\/","title":{"rendered":"Frontend Setup for Integrating DHTMLX Booking and Scheduler"},"content":{"rendered":"<p>The DHTMLX <a href=\"https:\/\/dhtmlx.com\/docs\/products\/dhtmlxBooking\/\" rel=\"noopener\" target=\"_blank\">JS booking calendar widget<\/a> is the latest addition to our portfolio of JavaScript tools for project management apps. It is designed to help dev teams build custom booking systems enriched with features for conveniently making appointments on the web. <\/p>\n<p>What makes it even more powerful is its seamless integration with the DHTMLX <a href=\"https:\/\/dhtmlx.com\/docs\/products\/dhtmlxScheduler\/\" rel=\"noopener\" target=\"_blank\">JavaScript scheduling component<\/a>, enabling developers to build more advanced and feature-rich scheduling solutions. In this guide, we\u2019ll walk you through the process of combining these two components on the frontend. Next time, we\u2019ll cover the backend part, where all the data is stored and converted for each component separately.<\/p>\n<h5>Example of Using DHTMLX Booking with Scheduler Component<\/h5>\n<p>It is hard to imagine a modern hotel, healthcare clinic, or beauty salon without a reliable booking system. Such tools allow organizations to streamline their operations by offering clients a hassle-free way to make appointments and reservations online.  <\/p>\n<p>It is not easy to find a ready-made solution that meets all the technical requirements and functional capabilities of a particular business model. That\u2019s where DHTMLX Booking and Scheduler can make a difference. Using these fully compatible JavaScript UI components, dev teams can build a custom appointment scheduling solution that complies with specific requirements with less time and effort. <\/p>\n<p>Our team prepared the <a href=\"https:\/\/snippet.dhtmlx.com\/d5zbq3g3?tag=booking&#038;mode=wide\" rel=\"noopener\" target=\"_blank\">integration demo<\/a> that vividly demonstrates how the DHTMLX Booking widget can be combined with the Scheduler within a single solution for a medical center.<\/p>\n<p>The demo consists of three main sections &#8211; Doctor Schedule, Booking, and Client Reservations. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image5.png\" alt=\"Integration of Booking with Scheduler - Views\" width=\"2048\" height=\"1152\" class=\"aligncenter size-full wp-image-13680\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image5.png 2048w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image5-300x169.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image5-768x432.png 768w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image5-1024x576.png 1024w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/p>\n<p>It is necessary to mention the main functional concepts used in each section of our demo:<\/p>\n<ol>\n<li>The Scheduler&#8217;s Timeline view presents periods of doctors&#8217; availability using single and recurring events (Doctor Schedule).<\/li>\n<li>The Booking widget generates available time slots from Scheduler data (events).<\/li>\n<li>Reserved time slots are displayed in the auxiliary section based on Scheduler (Client Reservations).<\/li>\n<\/ol>\n<p>The trickiest part of this integration is converting Scheduler events to Booking slots, which occurs on the server side. <\/p>\n<p>In this article, you will learn how to configure both DHTMLX components, thereby preparing them for achieving the main goal on the server-side.<\/p>\n<h5>Configuring Scheduler and Booking Components on Frontend<\/h5>\n<p>Before delving into the configuration peculiarities of all three sections implemented in our demo, we want to clarify several important details related to time slots (i.e. time units available for booking), recurrence, and timestamps.  <\/p>\n<p>There are two approaches to working with time slots in DHTMLX Booking:<\/p>\n<ol>\n<li>Showing schedules with only available time slots via the <strong>availableSlots<\/strong> parameter of the data property (for scenarios without recurrences).<\/li>\n<li>Showing schedules with recurring events\/recurring patterns and already reserved time slots using the <strong>slots<\/strong> array and <strong>usedSlots<\/strong> parameter of the <strong>data<\/strong> property. This approach is used in our integration demo.<\/li>\n<\/ol>\n<p>Since the Booking widget currently supports only weekly recurring events, it is necessary to exclude other recurrence options available in Scheduler in its config.<\/p>\n<p>And lastly, we have to mention that Booking works with timestamps in the local timezone.  When dealing with global timestamps, it is required to perform a corresponding conversion before sending these timestamps to Booking (and vice versa before saving the data back). Conversion instructions are provided on this page.<\/p>\n<p>Let us review how to configure each section separately and emphasize the main aspects of this process. <\/p>\n<h6>Doctor Scheduler Section<\/h6>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image5-1.png\" alt=\"Doctor Scheduler Section\" width=\"1851\" height=\"983\" class=\"aligncenter size-full wp-image-13684\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image5-1.png 1851w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image5-1-300x159.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image5-1-768x408.png 768w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image5-1-1024x544.png 1024w\" sizes=\"auto, (max-width: 1851px) 100vw, 1851px\" \/><br \/>\nFirst of all, it is necessary to create a separate Scheduler instance for the Doctor Schedule section with the <a href=\"https:\/\/docs.dhtmlx.com\/scheduler\/timeline_view.html\" rel=\"noopener\" target=\"_blank\">Timeline view<\/a>. It is done the following way:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>schedulerWidget<span class=\"br0\">&#41;<\/span> schedulerWidget.<span class=\"me1\">destructor<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\nschedulerWidget <span class=\"sy0\">=<\/span> Scheduler.<span class=\"me1\">getSchedulerInstance<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<br \/>\nschedulerWidget.<span class=\"me1\">plugins<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp;timeline<span class=\"sy0\">:<\/span> <span class=\"kw2\">true<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp;daytimeline<span class=\"sy0\">:<\/span> <span class=\"kw2\">true<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp;recurring<span class=\"sy0\">:<\/span> <span class=\"kw2\">true<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp;tooltip<span class=\"sy0\">:<\/span> <span class=\"kw2\">true<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp;minical<span class=\"sy0\">:<\/span> <span class=\"kw2\">true<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<br \/>\nschedulerWidget.<span class=\"me1\">createTimelineView<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp;name<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;timeline&quot;<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp;...<br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<br \/>\nschedulerWidget.<span class=\"me1\">init<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;doctor_scheduler&quot;<\/span><span class=\"sy0\">,<\/span> utcDate<span class=\"sy0\">,<\/span> <span class=\"st0\">&quot;timeline&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>First,  you need to load doctors\u2019 schedules.  After that, you initialize the <a href=\"https:\/\/docs.dhtmlx.com\/dataprocessor__index.html\" rel=\"noopener\" target=\"_blank\">DataProcessor<\/a> and bind the Scheduler instance for integration with the backend, where all the data will be stored:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">schedulerWidget.<span class=\"me1\">load<\/span><span class=\"br0\">&#40;<\/span>URL<span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;\/doctors\/worktime&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>dp<span class=\"br0\">&#41;<\/span> dp.<span class=\"me1\">destructor<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\ndp <span class=\"sy0\">=<\/span> <span class=\"kw1\">new<\/span> scheduler.<span class=\"me1\">DataProcessor<\/span><span class=\"br0\">&#40;<\/span>URL<span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;\/doctors\/worktime&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\ndp.<span class=\"me1\">init<\/span><span class=\"br0\">&#40;<\/span>scheduler<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>Since the Booking widget works well either with weekly schedules or arbitrary dates, you need to adjust Scheduler to create repetitive weekly events. To do that, you set a custom form for editing recurring events via <strong>schedulerWidget.form_blocks.recurring.render<\/strong>:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">schedulerWidget.<span class=\"me1\">form_blocks<\/span>.<span class=\"me1\">recurring<\/span>.<span class=\"me1\">render<\/span> <span class=\"sy0\">=<\/span> <span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"sy0\">=&gt;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp;<span class=\"kw1\">return<\/span> <span class=\"coMULTI\">\/* custom HTML for form *\/<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>Apart from the Timeline view and recurrence of events, the configuration of this section also includes other extensions (plugins) such as a mini calendar and tooltips. The full list of available Scheduler plugins can be found on this <a href=\"https:\/\/docs.dhtmlx.com\/scheduler\/extensions_list.html\" rel=\"noopener\" target=\"_blank\">page<\/a>.<\/p>\n<p>Using templates provided in Scheduler API, you can change the appearance of timeline elements, specify display of past events, and add custom content in event bars and tooltips. <\/p>\n<h6>Booking Section<\/h6>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image2-1.png\" alt=\"Booking +Scheduler - Booking section\" width=\"1870\" height=\"984\" class=\"aligncenter size-full wp-image-13687\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image2-1.png 1870w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image2-1-300x158.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image2-1-768x404.png 768w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image2-1-1024x539.png 1024w\" sizes=\"auto, (max-width: 1870px) 100vw, 1870px\" \/><\/p>\n<p>You\u2019ll need our JavaScript booking widget to add this section. It offers most of the required functionality out of the box, so you\u2019ll only need to initialize the widget and synchronize data.<\/p>\n<p>You initialize the Booking widget and load doctors\u2019 <a href=\"https:\/\/docs.dhtmlx.com\/booking\/api\/config\/booking-data\/\" rel=\"noopener\" target=\"_blank\">data<\/a> with their schedules and already booked slots from the backend, after converting all global timestamps into local ones.<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">bookingWidget <span class=\"sy0\">=<\/span> <span class=\"kw1\">new<\/span> booking.<span class=\"me1\">Booking<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;#root&quot;<\/span><span class=\"sy0\">,<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; start<span class=\"sy0\">:<\/span> utcDate<span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp; end<span class=\"sy0\">:<\/span> utcDate<span class=\"br0\">&#40;<\/span><span class=\"coMULTI\">\/*add 2 years*\/<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">,<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><br \/>\n<br \/>\nfetch<span class=\"br0\">&#40;<\/span>URL<span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;\/units&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span><br \/>\n&nbsp; &nbsp;.<span class=\"me1\">then<\/span><span class=\"br0\">&#40;<\/span>res <span class=\"sy0\">=&gt;<\/span> res.<span class=\"me1\">json<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span><br \/>\n&nbsp; &nbsp;.<span class=\"me1\">then<\/span><span class=\"br0\">&#40;<\/span>units <span class=\"sy0\">=&gt;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;<span class=\"co1\">\/\/ convert timestamps<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;...<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;<span class=\"me1\">bookingWidget<\/span>.<span class=\"me1\">setConfig<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#123;<\/span> data<span class=\"sy0\">:<\/span> units <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp;<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>You need to create a handler for processing reservations of time slots and convert local timestamps to global ones. This handler sends a POST request to the server, the data is saved in the same collection that is used when displaying data in the Client Reservation section:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">bookingWidget.<span class=\"me1\">setConfirmHandler<\/span><span class=\"br0\">&#40;<\/span>event <span class=\"sy0\">=&gt;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">const<\/span> <span class=\"br0\">&#123;<\/span> confirm<span class=\"sy0\">,<\/span> slot<span class=\"sy0\">,<\/span> data <span class=\"br0\">&#125;<\/span> <span class=\"sy0\">=<\/span> event<span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"kw1\">const<\/span> info <span class=\"sy0\">=<\/span> <span class=\"br0\">&#123;<\/span> <span class=\"coMULTI\">\/*event data*\/<\/span><span class=\"br0\">&#125;<\/span><span class=\"sy0\">;<\/span> <span class=\"co1\">\/\/ convert timestamps <\/span><br \/>\n<br \/>\n&nbsp; &nbsp; fetch<span class=\"br0\">&#40;<\/span>URL<span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;\/doctors\/reservations&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">,<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;method<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;POST&quot;<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp;body<span class=\"sy0\">:<\/span> JSON.<span class=\"me1\">stringify<\/span><span class=\"br0\">&#40;<\/span>info<span class=\"br0\">&#41;<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span>.<span class=\"me1\">then<\/span><span class=\"br0\">&#40;<\/span>response <span class=\"sy0\">=&gt;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>response.<span class=\"me1\">ok<\/span><span class=\"br0\">&#41;<\/span> confirm.<span class=\"me1\">done<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; <span class=\"kw1\">else<\/span> confirm.<span class=\"me1\">error<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp; <span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>Finally, we can proceed to the Client Reservation section.<\/p>\n<h6>Client Reservations Section<\/h6>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image1-1.png\" alt=\"Client Reservations Section\" width=\"1853\" height=\"985\" class=\"aligncenter size-full wp-image-13688\" srcset=\"https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image1-1.png 1853w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image1-1-300x159.png 300w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image1-1-768x408.png 768w, https:\/\/dhtmlx.com\/blog\/wp-content\/uploads\/2025\/04\/image1-1-1024x544.png 1024w\" sizes=\"auto, (max-width: 1853px) 100vw, 1853px\" \/><br \/>\nClient Reservations is an auxiliary section of our integration demo aimed to visualize reserved time slots via Scheduler views.<\/p>\n<p>It is configured similarly to the Doctor Schedule section, but the config itself is different.<\/p>\n<p>For this section, you set the Unit view with week units:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\"><span class=\"kw1\">if<\/span> <span class=\"br0\">&#40;<\/span>schedulerWidget<span class=\"br0\">&#41;<\/span> schedulerWidget.<span class=\"me1\">destructor<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\nschedulerWidget <span class=\"sy0\">=<\/span> Scheduler.<span class=\"me1\">getSchedulerInstance<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<br \/>\nschedulerWidget.<span class=\"me1\">plugins<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp;units<span class=\"sy0\">:<\/span> <span class=\"kw2\">true<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp;...<br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<br \/>\nschedulerWidget.<span class=\"me1\">createUnitsView<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp;name<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;week_unit&quot;<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp;property<span class=\"sy0\">:<\/span> <span class=\"st0\">&quot;doctor_id&quot;<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp;list<span class=\"sy0\">:<\/span> doctors<span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp;days<span class=\"sy0\">:<\/span> <span class=\"nu0\">3<\/span><span class=\"sy0\">,<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<br \/>\nschedulerWidget.<span class=\"me1\">init<\/span><span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;client_scheduler&quot;<\/span><span class=\"sy0\">,<\/span> utcDate<span class=\"sy0\">,<\/span> <span class=\"st0\">&quot;week_unit&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>First, you need to get data on doctors and scheduled appointments (i.e., client reservations). As a preparatory step, you should convert the time to a local timezone. <\/p>\n<p>To load this data from the backend, you\u2019ll need the following code:<\/p>\n<div class=\"codecolorer-container javascript default\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"javascript codecolorer\">Promise.<span class=\"me1\">all<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#91;<\/span><br \/>\n&nbsp; &nbsp;schedulerWidget.<span class=\"me1\">ajax<\/span>.<span class=\"kw1\">get<\/span><span class=\"br0\">&#40;<\/span>URL<span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;\/doctors&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">,<\/span><br \/>\n&nbsp; &nbsp;schedulerWidget.<span class=\"me1\">ajax<\/span>.<span class=\"kw1\">get<\/span><span class=\"br0\">&#40;<\/span>URL<span class=\"br0\">&#40;<\/span><span class=\"st0\">&quot;\/doctors\/reservations&quot;<\/span><span class=\"br0\">&#41;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">,<\/span><br \/>\n<span class=\"br0\">&#93;<\/span><span class=\"br0\">&#41;<\/span>.<span class=\"me1\">then<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#40;<\/span><span class=\"br0\">&#91;<\/span>doctorsReq<span class=\"sy0\">,<\/span> eventsReq<span class=\"br0\">&#93;<\/span><span class=\"br0\">&#41;<\/span> <span class=\"sy0\">=&gt;<\/span> <span class=\"br0\">&#123;<\/span><br \/>\n&nbsp; &nbsp;let events <span class=\"sy0\">=<\/span> JSON.<span class=\"me1\">parse<\/span><span class=\"br0\">&#40;<\/span>eventsReq.<span class=\"me1\">response<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n&nbsp; &nbsp;...<br \/>\n&nbsp; &nbsp;<span class=\"me1\">schedulerWidget<\/span>.<span class=\"me1\">parse<\/span><span class=\"br0\">&#40;<\/span>events<span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><br \/>\n<span class=\"br0\">&#125;<\/span><span class=\"br0\">&#41;<\/span><span class=\"sy0\">;<\/span><\/div><\/div>\n<p>The configuration of this section includes Units view, readonly mode, mini calendar (date picker), and a popup with event details (quick info). Apart from that, we also added a couple of customizations for the Quick Info window and vertical text display in the Unit view .<\/p>\n<p>That\u2019s it. These are the main steps required to implement the frontend part of the booking solution like in our demo using DHTMLX components. <\/p>\n<h5>Wrapping Up<\/h5>\n<p>As you can see, DHTMLX products allow for building feature-packed booking systems for streamlined appointment scheduling tailored to various industries. Extensive functional capabilities of the Scheduler component (customizable calendar views, recurring events, etc.) combined with the ready-made UI for managing reservations of the Booking widget give you everything you need to deliver a modern booking solution for the web. <\/p>\n<p>Next time, you will learn the main peculiarities of data conversion required for integration of DHTMLX Booking with Scheduler on the backen\u0432 like in our <a href=\"https:\/\/snippet.dhtmlx.com\/d5zbq3g3?tag=booking&#038;mode=wide\" rel=\"noopener\" target=\"_blank\">demo<\/a>.<\/p>\n<h5>Related Materials<\/h5>\n<ul>\n<li><a href=\"https:\/\/docs.dhtmlx.com\/booking\/\" rel=\"noopener\" target=\"_blank\">DHTMLX Booking documentation<\/a><\/li>\n<li><a href=\"https:\/\/docs.dhtmlx.com\/scheduler\/\" rel=\"noopener\" target=\"_blank\">DHTMLX Scheduler documentation<\/a><\/li>\n<li><a href=\"https:\/\/dhtmlx.com\/docs\/products\/dhtmlxBooking\/download.shtml\" rel=\"noopener\" target=\"_blank\">Booking trial version<\/a><\/li>\n<li><a href=\"https:\/\/dhtmlx.com\/docs\/products\/dhtmlxScheduler\/download.shtml\" rel=\"noopener\" target=\"_blank\">DHTMLX Scheduler trial version<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The DHTMLX JS booking calendar widget is the latest addition to our portfolio of JavaScript tools for project management apps. It is designed to help dev teams build custom &#8230;<\/p>\n","protected":false},"author":101014,"featured_media":13679,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[71],"tags":[33,78,15],"class_list":["post-13678","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-all-posts","tag-booking","tag-dhtmlxscheduler"],"_links":{"self":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/13678","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/users\/101014"}],"replies":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/comments?post=13678"}],"version-history":[{"count":7,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/13678\/revisions"}],"predecessor-version":[{"id":13692,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/posts\/13678\/revisions\/13692"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media\/13679"}],"wp:attachment":[{"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/media?parent=13678"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/categories?post=13678"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dhtmlx.com\/blog\/wp-json\/wp\/v2\/tags?post=13678"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}