display date in schedule

I have 2 question about the schedule.

  1. I use the timeline schedule. I add a timeline tab. I can display this tab page but I cannot add a tab name at the right hand . That is I want to display this timeline tab page, I need to go back to start page. I want to ask how can add this timeline tab.

  2. For dafualt, day tab, week tab and month tab have set on the schedule. For this adding timeline tab, the today’s date will display on the tab page. Now it’s date format is same as week tab. <date - date>. But I only want this date format is same as day tab format < today >. Only display today.

I want to ask this question solution.

Question 2, I have make a solution.

Pls make answer for question 1.

Thanks !

Ivan

Hello,

Not sure what you mean in the first question.
Be sure to check our timeline samples (dhtmlxScheduler/samples/06_timeline), how we add tab and name to it.

Kind regards,
Ilya

Ilya,

I have studied in the timeline samples (dhtmlxScheduler/samples/06_timeline). In fact, my project is done according to its sample. The project’s the code is also used from its sample.

Now, the main problem is :

  1. By default, , and tab are on the schedule. I add a new tab to schedule.

  2. I set the new tab on the starting page. Then the new tab content can also display at the starting.

  3. But cannot produce the new tab in the toolbar. The tab name cannot display same as to , and tab .

  4. If I choose other tab tab, then I cannot go back to the new tab due to lost the tab. I need to go back to starting page and display the new tab content again.

  5. Moreover, all data is lost according to point 4.

I try to test the following code :


  scheduler.locale.labels.timeline_tab = "Timeline";

This code is name the tab. This code is no function for the new tab . However, I use same code and change to , and tab that this case is work and OK.

I also concern on the following code :


 <div class="dhx_cal_tab" name="timeline_tab" style="right:280px;"></div>

This code is CSS to set and add the new tab.

How about your suggestion in this case.

Thanks for your help !

Ivan

I may provide the full code as following :



<div class="dhx_cal_navline">



	<div class="dhx_cal_date"></div>
	<div class="dhx_minical_icon" id="dhx_minical_icon" onclick="show_minical()">&nbsp;</div>

   <div class="dhx_cal_tab" name="timeline_tab" style="right:280px;"></div>



        <script type="text/javascript">

            var page_layout = new dhtmlXLayoutObject(document.body, '1C');

            var page_layout_header = page_layout.cells('a');

            page_layout_header.hideHeader();

          

            scheduler.locale.labels.timeline_tab = "Timeline";
           
            scheduler.locale.labels.section_description = "Description";
            scheduler.locale.labels.section_custom = "District";
            scheduler.locale.labels.section_subject = "Subject";
            scheduler.config.details_on_create = true;
            scheduler.config.details_on_dblclick = true;
            scheduler.config.xml_date = "%Y-%m-%d %H:%i";
            scheduler.config.time_step = 30;
            scheduler.config.start_on_monday = false;

         
            var sections = [
				{ key: 1, label: "KLN West - Airport" },
				{ key: 2 , label: "KLN East" },
				{ key: 3 , label: "MongKok - Hunghom" },
				{ key: 4, label: "YauMaTei - TST" },
                { key: 5, label: "CausewayBay - Southern" },
                { key: 6 , label: "HK Central - HK West" },
                { key: 7, label: "HK East" },
                 { key: 8, label: "NT East (KCR line)" },
                   { key: 9, label: "NT West" }
			];


                scheduler.config.lightbox.sections = [
                { name: "subject", height: 30, map_to: "text", type: "textarea", focus: true },
				{ name: "description", height: 130, map_to: "text", type: "textarea", focus: true },
		     	{ name: "custom", height: 23, type: "select", options: sections, map_to: "section_id" },
				{ name: "time", height: 72, type: "time", map_to: "auto" }
			];

             
                scheduler.createTimelineView({
                    name: "timeline",
                    x_unit: "minute",
                   x_date: "%H:%i",
                    x_step: 30,
                    x_size: 24,
                    x_start: 0,
                    x_length: 48,
                    y_unit: sections,
                    y_property: "section_id",
                    render: "bar"
                });

                function show_minical() {
                    if (scheduler.isCalendarVisible())
                        scheduler.destroyCalendar();
                    else
                        scheduler.renderCalendar({
                            position: "dhx_minical_icon",
                            date: scheduler._date,
                            navigation: true,
                            handler: function (date, calendar) {
                                scheduler.setCurrentView(date);
                                scheduler.destroyCalendar()
                            }
                        });
                }

                       page_layout_header.attachScheduler(new Date(), "timeline");