[英]Show Jquery Date time picker onclick
I am using a ASP.NET GRIDVIEW. 我正在使用ASP.NET GRIDVIEW。 The column I am interested in is the "CHECKED IN" column that contains a checkbox and a label.
我感兴趣的列是“ CHECKED IN”列,其中包含一个复选框和一个标签。
The grid can bring back many lines of data from the database: 网格可以从数据库中带回许多数据行:
Here's what I need to do: 这是我需要做的:
checked in Checkbox 2. When the user has selected a date and time, I would like the value to appear in the label next to the Checked in checkbox. 在复选框2中选中。当用户选择日期和时间后,我希望该值显示在“复选框”旁边的标签中。 DateTime to show only when it has been selected.
DateTime仅在选择时显示。
[Label is updated][4] [标签已更新] [4]
Hope this makes sense? 希望这有意义吗?
The only issue is that the GridView creates itself dynamically. 唯一的问题是GridView是动态创建的。
Thanks for your message. 感谢您的留言。
I did resolve this, however I slightly changed what I was doing. 我确实解决了这个问题,但是我做了些改动。
Here's my code... 这是我的代码...
$(".CheckOut").each(function () {
$(this).datetimepicker({
dateFormat: 'dd/mm/yy',
onClose: function (selectedDateTime) {
return Validate(this, this.id);
}
});
});
This code is exactly what I needed for the date/time picker to work within a GridView. 这段代码正是我在GridView中使用日期/时间选择器所需要的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.