EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jd0000 on April 17, 2013, 07:46:27 AM



Title: datetimebox setValue error
Post by: jd0000 on April 17, 2013, 07:46:27 AM
When I try to use $('#datefield').datetimebox('setValue','4/12/2013 11:15'); i get the error
TypeError: $.data(...) is undefined
line is jquery-easyui-1.3.2.min.js line 11048
is the command I am using wrong?


Title: Re: datetimebox setValue error
Post by: stworthy on April 19, 2013, 01:59:13 AM
Please refer to this example http://jsfiddle.net/Amavh/. It works fine.


Title: Re: datetimebox setValue error
Post by: jd0000 on April 19, 2013, 06:50:15 AM
yup that works fine. ive been trying to narrow down the issue. my html with the datetime input is loaded through ajax. when i put it on the initial page statically it works. when i load it through ajax i get that error

TypeError: $.data(...) is undefined
[Break On This Error]    
var opts=$.data(_823,"datetimebox").options;

jquery-easyui.min.js line 11048 ( my easyui min is different from the one you used on jfiddle, but its the same version? ... i tried the one you used and had the same problem ).


Title: Re: datetimebox setValue error
Post by: jd0000 on April 19, 2013, 07:37:53 AM
ok got it now. it was related to it being ajax.