After digging around I found this post -Use Java Script to get a control's Validation Group and learned that those properties are called 'expando properties'. There I get something that was of my interest: is-there-a-cross-browser-way-to-use-a-jquery-selector-on-an-expando-property.
Vb net datetimepicker validating
Note the syntax ($("[id$='_txt Date']")) I am using to find my Text Box.
Initialize the datepicker and set the handler for on Select event.
Second attempt: So now I knew that my only option is to somehow get the Validation Group.
I knew that this property is not rendered along-side the control markup because I already tried that and also checked that in the html source.
So from my standpoint I was passing a "control id" but the function won't.
Since it could not find any match for the value I was passing, it wasn't actually validating but just ignoring the validation and passing back true i.e. This causes every validation message to be made hidden. I noticed that when the date portion was invalid I got the standard "date is not valid". However, now if the time is wrong, the message shows above the datetimepicker. Hi Joshn, I would recommend using the validation rule to check if the Date Time Picker widget value is null.However if only the time portion was invalid, the form would validate. If the date is wrong, it shows below the datetimepicker. In case it is null then either the date or the time is invalid and you should raise an error. Parse Exact() methods for converting a string-based date to a System. Substract method may be used in order to find the date-time difference between two instances of the Date Time method. Find date difference By default Date Time is not nullable because it is a Value Type, using the nullable operator introduced in C# 2, you can achieve this. Datetime object to null The following C# program shows how to set and get the value of a Date Time Picker1 control.yes, you are correct but i want that when user select date or time and if its greater than today's date and time then immediatley validation occur.