easyUI 日历控件 -- 设置背景提示

再用easyui的时候,发现easyui的input标签不支持h5的placeholder

解决办法:

当页面加载完毕的时候,将easyui生成的input标签的placeholder重新设置

 

===========================
$(".easyui-datebox").each(function(i){
var span = $(this).siblings("span")[i];
var targetInput = $(span).find("input:first");
if(targetInput){
$(targetInput).attr("placeholder", $(this).attr("placeholder"));
}
});

===========================

body中:

<input name="startTime"

          id="startTime"

          type="text"

          data-options="formatter:dateFormat,parser:dateParser,editable:true"

         style="width:150px; height:30px; background-color:white; "

         placeholder="yyyy-mm-dd"

         class="easyui-datebox" />
&nbsp;至&nbsp;
<input name="endTime"

    id="endTime"

    type="text"

    data-options="formatter:dateFormat,parser:dateParser,editable:true"

    style="width:150px; height:30px; background-color:white; "

    placeholder="yyyy-mm-dd"

    class="easyui-datebox" />

 ===========================

posted @ 2016-08-14 00:11  蔡昊  阅读(1713)  评论(0编辑  收藏  举报