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

Rad Date Picker Date Input issue

10 Answers 183 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
SKY
Top achievements
Rank 1
SKY asked on 26 Oct 2010, 07:04 AM
Hi,

I am using RadDatePicker control which is having Date input and calendar inside it.
when i am typing some date inside the date input (without slashes/hyphens e.g. 20090101)  and doing a post back, then the value entered is accessible on the client side but is not reflected on the server side. 
If i am typing the date in and then pressing tab (or if the focus is outside the date input by some operation) then it is automatically changing the entered date with proper format (e.g. 2009/01/01) and then the date is getting reflected on server side. 
Is there any operation i need to do to update it on the server side. Or am i missing any attribute to set for the date picker so that whatever date we are entering in date input will be reflected on server side during post back.

Please find attached the screenshot for the RadDatePicker control.

Thanks in advance.

10 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 26 Oct 2010, 08:13 AM
Hello Sky,

It will be a lot easier for you and us if you provide your code as text, instead of a screenshot.

Generally, you should not set AutoPostBack="true" for the DateInput in this case - postbacks should be managed by the parent RadDatePicker control.

Also, make sure that you are accessing the value server side with dtmFmDt.SelectedDate, not via the control's DateInput.

Since a user input of 20090101 is not supported, I suppose you are handling this case in the DateInput's OnError event - can you provide that Javascript as well, in case you need further assistance?

Greetings,
Dimo
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
0
SKY
Top achievements
Rank 1
answered on 26 Oct 2010, 08:56 AM
Hi Dimo,

Thanks for your reply.

I was doing some testing so i have included AutoPostBack="true" for the date input.

This was the server side code where i was accessing the value:
if (dtmFmDt != null && dtmFmDt.SelectedDate != null)
        {
            searchCriteriaType.FromDate = dtmFmDt.SelectedDate.Value;
        }
if (dtmFmDt != null && dtmFmDt.SelectedDate != null)
        {
            searchCriteriaType.FromDate = dtmFmDt.SelectedDate.Value;
        }
if (dtmFmDt != null && dtmFmDt.SelectedDate != null)
        {
            searchCriteriaType.FromDate = dtmFmDt.SelectedDate.Value;
        }
 if (dtmFmDt != null && dtmFmDt.SelectedDate != null)
{
            searchCriteriaType.FromDate = dtmFmDt.SelectedDate.Value;
        }
{
            searchCriteriaType.FromDate = dtmFmDt.SelectedDate.Value;
        }
{
object.FromDate = dtmFmDt.SelectedDate.Value;
}

This SelectedDate was coming as null. I tried with ValidationDate also and even that was coming as null.

And for the use input 20090101 the OnError event is not fired. and once the focus is out of the date input, it is converting this 20090101 to 2009/01/01. Am i missing any property for the date input which needs to be set. 
If i am giving any wrong data then OnError event is fired.   
function ShowDateError(sender, args) 
        { 
         alert ("Enter a Valid Date in YYYY/MM/DD Format"); 
         sender.focus();  
         return false;
        }
function ShowDateError(sender, args)
{
alert ("Enter a Valid Date in YYYY/MM/DD Format"); 
return false;
}

Please tell me if any other information is required.
Thanks...
function ShowDateError(sender, args) 
        { 
         alert ("Enter a Valid Date in YYYY/MM/DD Format"); 
         sender.focus();  
         return false;
        
        { 
         alert ("Enter a Valid Date in YYYY/MM/DD Format"); 
         sender.focus();  
         return false;
   
0
Dimo
Telerik team
answered on 26 Oct 2010, 10:13 AM
Hello Sky,

I suggest you to open a regular support ticket and submit a simple standalone runnable project, because there is some discrepancy between your description and the behavior I am observing on my side. Thank you.

Best wishes,
Dimo
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
0
SKY
Top achievements
Rank 1
answered on 26 Oct 2010, 10:31 AM
Hi Dimo,

Can you please tell me how & from where i can open a ticket as i was using this forum for the first time.

I am preparing the runnable project and will upload it.

Thanks..
0
SKY
Top achievements
Rank 1
answered on 26 Oct 2010, 10:43 AM
Hi Dimo,

Got the place to create support ticket.

Not sure in how many days it will be answered.
Can you please tell me around how much time it will take to be taken care.

Thanks..
0
Dimo
Telerik team
answered on 26 Oct 2010, 12:15 PM
Sky,

Your support ticket response time is up to 24 hours:

http://www.telerik.com/support/technical-support-options.aspx


Regards,
Dimo
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
0
atul
Top achievements
Rank 1
answered on 27 Oct 2010, 10:51 PM
date picker control got one poperty mindate..which is by default is 1980 something..and im using this control through out my project..now i know i can find each and every raddatepicker control and can set the mindate property to anything..but is their any other way to use some sort of global thing or themes to set the mindate propert of all raddatepicker to something. the only reason why im doing this is i need my raddatepicker minddate set to 1800 ..i will really appreciate any help?????
0
Dimo
Telerik team
answered on 28 Oct 2010, 10:19 AM
Hi Atul,

Yes, you can use an ASP.NET theme for all your web pages to set the MinDate property globally.

Regards,
Dimo
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
0
atul
Top achievements
Rank 1
answered on 28 Oct 2010, 11:24 PM
Hi Dimo,

Thanks for your prompt reply...and correct me if im wrong..but as far as i know..we can only change look and feel of control by using theme ..not their poperty..

Kind Regards,
Atul
0
Dimo
Telerik team
answered on 29 Oct 2010, 07:51 AM
Hi Atul,

Please note the difference between ASP.NET themes, ASP.NET skins and RadControls skins.

+ an ASP.NET theme is a collection of properties and/or styles. An ASP.NET theme is identified by a subfolder inside the App_Themes folder in your website. This folder can contain ASP.NET skins and / or RadControls skins and / or regular CSS files.

+ an ASP.NET skin is a collection of properties. An ASP.NET skin is identified by a *.skin file inside an ASP.NET theme folder

+ a RadControl skin is a collection of CSS styles. A RadControl skin is a *.css file.

More about ASP.NET themes is available at:

http://msdn.microsoft.com/en-us/library/ykzx33wh.aspx

http://msdn.microsoft.com/en-us/library/0yy5hxdk%28VS.80%29.aspx


Regards,
Dimo
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
General Discussions
Asked by
SKY
Top achievements
Rank 1
Answers by
Dimo
Telerik team
SKY
Top achievements
Rank 1
atul
Top achievements
Rank 1
Share this question
or