Hi,
Is possibile set a value to dhtmlx calendar from client ?
The method setDate, set the correct value in the calendar widget but the attached input don’t refresh; i’m using a dhtmlx form and i don’t know the attached input (id) because the code is autogenerated.
js object about form (not complete) : [
{ type: “settings”, position: “label-left”, labelWidth: “auto”, inputWidth: “auto”},
{ type: “calendar” , name:“calTo”, label:“A”, dateFormat:“%Y-%m-%d”, required: true, validate:“NotEmpty”, enableTime:false, readonly:true, inputWidth:120 }
]
Any tricks or tips ?
On other problem is that enableTime attribute don’t work and i have to get the calendar widget and call .hideTime();
Please try to use attached library instead of the original. We have fixed the problem in it.
If you are using dhtmlx.js in your app, you may generate the library using libCompiler in Suite package. You need to replace the existing dhtmlxCalendar/codebase/dhtmlxcalendar.js and run libCompiler. dhtmlxcalendar.zip (11.3 KB)
Ok.
About first question setItemValue(), this function not work properly.
var d = new Date();
form.setItemValue(“cal_from”, d);
form.send(‘url’,“post”,function(loader, response) { … }
The form send the old date value (“cal_from”).
Sometimes work and sometimes not work. Can i force ? Are there any function (for form component) to force ?
Ok, it’s work but there is a new issue.
Whenever set a value from client side (form.setItemValue(name, value)), the date format change.
Attached my demo. demoupdated_2.rar (493 KB)