EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Deiva on May 18, 2012, 07:01:04 PM



Title: datebox can not get property of formatter
Post by: Deiva on May 18, 2012, 07:01:04 PM
date convert function
Code:
function dateformatter(v) {alert(v);}

the follow code can not invoke dateformatter to conver date format.
Code:
<input id="dd" class="easyui-datebox" formatter="dateformatter"></input>

but if using the following code, it works!
Code:
<input id="dd"></input>
<script type="text/javascript">
$('#dd').datebox({
        formatter: dateformatter
});
</script>


Title: Re: datebox can not get property of formatter
Post by: stworthy on May 30, 2012, 06:31:04 PM
Some event and function properties cannot be retrieved from markup. A 'data-options' attribute will be added to solve this issue since next release version. The preview code:
Code:
<input id="dd" class="easyui-datebox" data-options="formatter:dateformatter,parser:function(s){...}" />