dedecms 时间文本框实现自带时间控件选择

dedecms5.5 

第一步 

在需要显示的时间控件的页面模板加

<script src="js/webcalendar.js" type="text/javascript"></script>

 

第二步

打开生成控件页面 

include/customfields.func.php 

第三步

109行

$innertext = "<input name=\"$fieldname\" value=\"$nowtime\" type=\"text\" id=\"$fieldname\" style=\"width:250px\"  />";

换成(加事件)

$innertext = "<input name=\"$fieldname\" value=\"$nowtime\" type=\"text\" id=\"$fieldname\" style=\"width:250px\" onclick=\"SelectDate(this,'yyyy-MM-dd hh:mm:ss',80,0);\"  />"; 

 466行

$innertext = "<input name=\"$fieldname\" value=\"$nowtime\" type=\"text\" id=\"$fieldname\" style=\"width:250px\"  />";

换成(加事件)

$innertext = "<input name=\"$fieldname\" value=\"$nowtime\" type=\"text\" id=\"$fieldname\" style=\"width:250px\" onclick=\"SelectDate(this,'yyyy-MM-dd hh:mm:ss',80,0);\"  />"; 

 

第四步

保存 完毕

效果展示

http://www.wyzcw.com/member/archives_sg_add.php?channelid=-8 

 

dedecms5.6  

 

第一步 

在需要显示的时间控件的页面模板加

<script src="templets/js/webcalendar.js" type="text/javascript"></script>

 

第二步

打开生成控件页面 

include/customfields.func.php 

第三步

115行

$innertext = "<input name=\"$fieldname\" value=\"$nowtime\" type=\"text\" id=\"$fieldname\" style=\"width:250px\" class=\"intxt\"    />";

换成(加事件)

$innertext = "<input name=\"$fieldname\" value=\"$nowtime\" type=\"text\" id=\"$fieldname\" style=\"width:250px\" class=\"intxt\" onclick=\"SelectDate(this,'yyyy-MM-dd hh:mm:ss',80,0);\"   />";

 472行

$innertext = "<input name=\"$fieldname\" value=\"$nowtime\" type=\"text\" id=\"$fieldname\" style=\"width:250px\" class=\"intxt\"    />";

换成(加事件)

$innertext = "<input name=\"$fieldname\" value=\"$nowtime\" type=\"text\" id=\"$fieldname\" style=\"width:250px\" class=\"intxt\" onclick=\"SelectDate(this,'yyyy-MM-dd hh:mm:ss',80,0);\"   />";

 

 第四步

保存 完毕

posted on 2010-06-21 13:56  兵戈  阅读(466)  评论(0编辑  收藏  举报