Hide time in TimePeriod section of Scheduler Ligthbox

Hi,

Is it possible to hide the time in the Time period section of the Scheduler lightbox? I only want to have the start date and end date but without the time combo.

Thank you!

Can be done only through code customization

Hi Sir Stanislav,

Could you elaborate more? I tried using { name:“time”, height:72, type:“calendar_time”, map_to:“auto” } but the time portion is still displayed.

Also, I’m encountering a problem when updating a schedule more than once in my timeline. The first update runs smoothly, but after a few edits it stops working. In the debug view, the scheduler seems to get stuck in

row 26 marked [updated,valid]
Initiating data sending for 26
row 26 marked [updated,valid]
Initiating data sending for 26

Hope you guys can help!
Thank you :slight_smile:

here’s the console output of chrome:

[code]DataProcessor :: row 26 marked [updated,valid]
DataProcessor :: Initiating data sending for 26
Uncaught TypeError: Cannot read property ‘!nativeeditor_status’ of undefined

DataProcessor :: row 26 marked [updated,valid]
DataProcessor :: Initiating data sending for 26
Uncaught TypeError: Cannot read property ‘!nativeeditor_status’ of undefined[/code]

here’s the console output of IE:

SCRIPT5007: Unable to get value of the property '!nativeeditor_status': object is null or undefined dhtmlxscheduler_debug.js, line 4254 character 2 LOG: DataProcessor :: row 26 marked [updated,valid] LOG: DataProcessor :: Initiating data sending for 26

As for timeline - it does look as a problem with event saving.
Are you using connector on server side, or custom code?

In first case - please enable connector’s log and provide its output for the problematic operation.
In second case - please check that server side code outputs valid xml response

I tried using { name:“time”, height:72, type:“calendar_time”, map_to:“auto” }
This will not help, default time editor will always have a time section, you need to create a custom time section to have only date in it.

Hi Stanislav,

I’m trying to create my own custom date picker as you suggested. However I’m encountering several problems and some questions as well:

  1. The date displayed is : Wed Feb 29 2012 00:00:00 GMT+0800 (Malay Peninsula Standard Time). Instead of just 02/29/2012. Is this possible to be templated?

  2. When I click Save nothing happens, when I look at the browser’s console I’m getting a:

Uncaught TypeError: Object Tue Mar 06 2012 00:00:00 GMT+0800 (Malay Peninsula Standard Time) has no method 'getDate' scheduler.is_one_day_eventdhtmlxscheduler.js:127 scheduler._empty_lightboxdhtmlxscheduler.js:179 scheduler.save_lightboxdhtmlxscheduler.js:181 _get_lightbox.onclick

  1. I’m also trying to attach jquery’s datepicker to the textbox, is this possible as well?

$(function () { $("#custom_startdate").datepicker({ changeMonth: true, changeYear: true, dateFormat: 'yy-mm-dd', yearRange: '-1:+5' }); });

scheduler.form_blocks["custom_starttimeperiod"]={
	render:function(sns){
		return "<div class='dhx_cal_ltext'>&nbsp;<input type='text' id='custom_startdate'></div>";
	 },
	set_value:function(node,value,ev){
		node.childNodes[1].value=value||"";
	},
	 get_value:function(node,ev){
		return node.childNodes[1].value;
	 },
	focus:function(node){
		var a=node.childNodes[1]; a.select(); a.focus(); 
		}
}
scheduler.form_blocks["custom_endtimeperiod"]={
	render:function(sns){
		return "<div class='dhx_cal_ltext'>&nbsp;<input type='text' id='custom_enddate'></div>";
	},
	set_value:function(node,value,ev){
		node.childNodes[1].value=value||"";
	},
	get_value:function(node,ev){
		 return node.childNodes[1].value;
	},
	 focus:function(node){
		var a=node.childNodes[1]; a.select(); a.focus(); 
	 }
}

scheduler.config.lightbox.sections = [
         {name:"shiftname", map_to:"shiftId", type:"select", options: shiftNames},
         {name:"startdate", type:"custom_starttimeperiod", map_to:"start_date"},
         {name:"enddate", type:"custom_endtimeperiod", map_to:"end_date"}
];

In your version of code get_value method return string, while it need to return Date object

docs.dhtmlx.com/doku.php?id=dhtm … te_formats

get_value:function(node,ev){ var convert = scheduler.date.str_to_date("%format%",true); return convert(node.childNodes[1].value); },

where %format% is a date format string
docs.dhtmlx.com/doku.php?id=dhtm … ngs_format