在同一表格上有两个日期时间选择器 [英] Having two date time pickers on the same form

查看:85
本文介绍了在同一表格上有两个日期时间选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<link rel="stylesheet" type="text/css" href="../testdatetime/jquery.datetimepicker.css"/ >
	<script src="../testdatetime/jquery.js"></script>
	<script src="../testdatetime/jquery.datetimepicker.js"></script>
	
	<label for="datetimepicker">Enter the start date and time of the event</label>
	<br></br>
	<input name="event_start_date_time" id="datetimepicker" type="text" >
	<br></br>
	
	<label for="datetimepicker">Enter the end date and time of the event</label>
	<br></br>
	<input name="event_end_date_time" id="datetimepicker" type="text" >
	<br></br>
	
	
	<script>
	jQuery('#datetimepicker').datetimepicker();
	</script><br></br>









这里错误的第一个日期选择器工作得很好但是第二个不能正常工作





Whats wrong here the first date picker works perfectly but the second doesnt work at all

推荐答案

两者都有相同的 id 。更改两个日期时间选择器之一的ID。
Both have the same id. Change the id of one of the two datetimepickers.


这篇关于在同一表格上有两个日期时间选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆