I have searching many websites for datetime pickers and have not found anything useful. I finally I found a jQuery and JavaScript Date Time Picker and it is very simple and attractive.
Link: https://github.com/eternicode/bootstrap-datepicker
So I have simplified and created a reusable control for this date time picker. Please find the attachment for it.
I have used the Ajax Update Panel in this article. So you can use this asynchronously in you project
Screenshots
EXAMPLES
User Control Code
Adding Date Time on Page
Register the user control in the page.
Add the register control to the page.
JavaScript Code
Date Format
$('.datepicker').datepicker({
format: 'mm-dd-yyyy'
});
Language and Hours Format
$('#datetimepicker2').datetimepicker({
language: 'en',
pick12HourFormat: true
});
Pick Only Date Format
$('#datetimepicker3').datetimepicker({
pickDate: false
});
Pick Only Time Format
$('#datetimepicker4').datetimepicker({
pickTime: false
});
NOTE
-
I have used the Update Panel in this article. So you can also use this with the Ajax Update panel.
-
Hope this will useful in you code. Please provide the comments.