Possible Duplicate:
DateTimePicker: pick both date and time
I'm using a WinForm DateTime picker and it does a fantastic job of choosing dates, but I don't know how to do times. It looks like a time is associated with the value, so maybe there's a way to use this to pick a time?
If there is no built in way to do this, I'll just create another box for the time and modify the DateTime value from the DateTime picker.
Thanks!
It Seems simple. $('#startdatetime-from'). datetimepicker({ language: 'en', format: 'yyyy-MM-dd hh:mm' });
A DateTimePicker control allows users to select a date and time in Windows Forms applications. In this tutorial, we will see how to create a DateTimePicker control at design-time as well as at run-time, set its properties and call its methods.
Definition. Represents a Windows control that allows the user to select a date and a time and to display the date and time with a specified format.
You can use the built in DateTime picker by adding a custom format string as follows:
DateTimePicker.ShowUpDown = true; DateTimePicker.CustomFormat = "hh:mm"; DateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
Enjoy!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With