Change time format in the calendar

hola.
me gustaria saber como cambiar el formato a 12 horas que aparece en la parte inferior del calendario… Lo estoy utilizando en conjunto con el grid (01_calendar_grid)…

Gracias… :smiley:

hello I would like to know how to change the format to 12 hours shown in the bottom of the calendar … I am using it in conjunction with the grid (01_calendar_grid) …

sorry ES, I forgot for a moment where I was writing. :cry:

Hello

Modify the following and it worked.

I put it in order for two reasons.

to feed the forum and for some expert can tell me if I affect other functions correct.

[code] // init hours
if (type == “hours”) {

		this._hsCells = {};
		
		this.hsCont = document.createElement("DIV");
		this.hsCont.className = "dhtmlxcalendar_area_"+css;
		this._sel.firstChild.firstChild.firstChild.childNodes[1].appendChild(this.hsCont);
		
		var i = 0;
		for (var q=0; q<4; q++) {
			var ul = document.createElement("UL");
			ul.className = "dhtmlxcalendar_selector_line";
			this.hsCont.appendChild(ul);
			for (var w=0; w<6; w++) {
				var li = document.createElement("LI");
				if (i>12)
				{
				 li.innerHTML = this._fixLength((i - 12) + ' pm ',2);		
				}else
				{
			    li.innerHTML = this._fixLength(i + ' am ',4);
				}
				
				li.className = "dhtmlxcalendar_selector_cell";
				ul.appendChild(li);
				li._hours = i;
				li._cell = true;
				this._hsCells[i++] = li;
			}
		}[/code]

Hello,

unfortunately, calendar does not allow to define 12-hour format for time selector. Therefore, code modification is a correct solution. But probably you will need to redefine the _updateVisibleHours method too. In this case you will see 12-hour time in time footer, not only in selector.