Date Picker

Jan 31, 2013 at 5:00 PM
Edited Jan 31, 2013 at 5:14 PM
Hi
I'm using the Configuration object to pass the JqGrid settings but noticed that the library is not working well when passing the EditOptions for date columns, I'm setting EditOptions as follows:

cm.EditOptions=new JqGridColumnEditOptions(){DataInit="function(el) { setTimeout(function() { $(el).datepicker(); }, 200); }"};

I noticed that the library doesn't render the datepicker part.

this is the render part got from firebug:
{"align":"right","editable":true,"editoptions":{},"editrules":{"required":true},"formoptions":{"elmsuffix":"*"},"formatter":"date","summaryTpl":null,"index":"","searchoptions":{"sopt":["eq","ne","equalornotequal","lt","le","gt","ge","nu","nn","notextoperators"]},"name":"OrderDate"}


Thanks
Coordinator
Jan 31, 2013 at 7:29 PM
Edited Jan 31, 2013 at 7:31 PM
Hi,

There are limitations to jqGrid configuration import/export functionality. When using this functionality there is no way to pass JavaScript for any callbacks or events. The reason for that is because the configuration gets serialized into JSON and send to the client - JavaScript functions can't be passed this way. If you want to configure any callbacks or event handlers, the only way is to add them in importComplete callback on client side (the same way the navigator is being configured in the sample project).

Despite that I see that there is an issue with generating sopt - I will fix this.