Hi,
I am using Raddatepicker and i want to select only Date part from the that textbox.
i using like this DatePicker.SelectedDate
Like: currently comming : 9/29/2011 12:00:00 AM
required : 9/29/2011 or 09/29/2011.
and i want to pass in my method '09/29/2011' but Passing going '9/29/2011 12:00:00 AM
Thanks
Manish
I am using Raddatepicker and i want to select only Date part from the that textbox.
i using like this DatePicker.SelectedDate
Like: currently comming : 9/29/2011 12:00:00 AM
required : 9/29/2011 or 09/29/2011.
and i want to pass in my method '09/29/2011' but Passing going '9/29/2011 12:00:00 AM
Thanks
Manish
5 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 29 Sep 2011, 08:24 AM
Hello Manish,
You can set the DateFormat as follows.
aspx:
Thanks,
Shinu.
You can set the DateFormat as follows.
aspx:
<telerik:RadDatePicker ID="RadDatePicker 1" DateInput-DateFormat="MM/dd/yyyy"></telerik:RadDatePicker>Thanks,
Shinu.
0
Manish
Top achievements
Rank 2
answered on 29 Sep 2011, 02:03 PM
This is not working for me. Actually i need to send it
0
Shinu
Top achievements
Rank 2
answered on 11 Oct 2011, 12:59 PM
Hello Manish,
You can try the following approach to get the Date from the DateTime object.
C#:
Thanks,
Shinu.
You can try the following approach to get the Date from the DateTime object.
C#:
protected void RadDatePicker1_SelectedDateChanged1(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e) { DateTime dt =Convert.ToDateTime( RadDatePicker1.SelectedDate); string temp = dt.ToShortDateString(); }Thanks,
Shinu.
0
Irving
Top achievements
Rank 2
answered on 05 Jun 2014, 01:23 AM
DateTime dt =Convert.ToDateTime( RadDatePicker1.SelectedDate); string temp = dt.ToShortDateString();This works thanks ^^
0
Manish
Top achievements
Rank 1
answered on 15 Jul 2016, 08:42 AM
Try this...
DateTime? toDate = new DateTime();
toDate = dtToDate.SelectedDate;
string toStringValue= toDate.Value.ToString("MM/dd/yyyy");