This is a migrated thread and some comments may be shown as answers.

Javascript validation for datepicker

1 Answer 65 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Saran kumar
Top achievements
Rank 1
Saran kumar asked on 13 Jul 2010, 08:03 AM
hi im using the rad date picker from the below code. every thing works fine. but in validation im using the javascript.
<telerik:RadDatePicker ID="radPublishDate" runat="server" Style="margin-left: 0px;
                                                    z-index: 11000000000000;" ClientEvents-OnPopupOpening="PopupOpening" Height="12px"
                                                    Width="100px" Culture="English (United States)" Skin="Office2007" EnableMultiSelect="false">
                                                    <DateInput ID="publishDateInput" runat="server" Height="14px" DateFormat="MM/dd/yyyy"
                                                     DisplayDateFormat="MM/dd/yyyy">
                                                    </DateInput><Calendar ID="Calendar1" Skin="Office2007" UseColumnHeadersAsSelectors="False"
                                                        runat="server" UseRowHeadersAsSelectors="False" ViewSelectorText="x" ToolTip="Select Date"
                                                        ShowRowHeaders="false">
                                                    </Calendar>
                                                    <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                                </telerik:RadDatePicker>

i just need to hide this and make the background as red on validation.

e.g im using javascript

$(

'ctl00_ContentPlaceHolder1_ucNote1_radPublishDate').SelectedDate == null  - is not working
$('ctl00_ContentPlaceHolder1_ucNote1_radPublishDate').style.visibility = 'hidden' - is not working
$('ctl00_ContentPlaceHolder1_ucNote1_radPublishDate').style.backgroundcolor = '#FF9F9F' -not working

please let me know the correct properties to achive these functionalites.

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Jul 2010, 08:10 AM
Hi,

 This code is not related to our Silverlight date-picker. Please post in the relevant forum category!

Greetings,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
DatePicker
Asked by
Saran kumar
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or