Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Calendar > RadDatePickers sharing one RadCalendar: how to set default date for them to show?
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

RadDatePickers sharing one RadCalendar: how to set default date for them to show?

Feed from this thread
  • Alan Liu avatar

    Posted on Jun 9, 2006 (permalink)

    I've searched the forum and found no posts talking about my situation.

    I got 40 some RadDatePickers on my page and I let them share one RadCalendar to help on quicker page loading. Each of the RadDatePicker is bound to a corresponding database date field, and if there's data, the date data shows; if no data, the DateInput box is empty and ready for user to pick a date, but every time the calendar panel pops up, the starting date is always 07/0/7/1777, which is the MinDate set in the RadDatePicker. What I want is to have the date of the calendar panel set to be current date when the RadDatePicker is clicked. Also I'm wondering if it's possible to achieve this through the shared RadCalendar so all the RadDatePicker sharing it will have same effect.

    I'm using rad.calendar 1.5.1, TIA.

  • Steve Steve admin's avatar

    Posted on Jun 11, 2006 (permalink)

    Hello Alan,

    This behavior has been changed in v.1.6. of the date-picker and by default it would open to Today's date. There are also a few bugs fixed including one concerning the sharedcalendar functionality. Please update to r.a.d.calendar v.1.6 and you should be able to accomplish the desired effect out of the box.

    Let us know if you have other questions.

    Sincerely yours,
    Steve
    the telerik team

  • Alan Liu avatar

    Posted on Jun 13, 2006 (permalink)

    Thank you Steve, I upgraded to v1.6 and it solved the problem.

    But one thing I noticed is, every time when I click to open a RadDatePicker (let's say at somewhere near the bottom of the page), the page jumps back to the top of the page as if it was just loaded, then I scroll down and see the DatePicker pops up. Do you know what could be the reason of this weird behavior?

  • Steve Steve admin's avatar

    Posted on Jun 13, 2006 (permalink)

    Hi Alan,

    We are aware of this issue and it will be fixed in the next official version of the product. For the time being, we can suggest you the following workaround -- override the default onclick attribute for the popup button like this:

    protected void Page_Load(object sender, EventArgs e)
    {
        RadDatePicker1.PopupButton.Attributes["onclick"] = string.Format("window['{0}'].TogglePopup(); return false;", RadDatePicker1.ClientID);
    }

    Sorry for the inconvenience and thank you for your patience and understanding. 

    Regards,

    Steve
    the telerik team

  • Alan Liu avatar

    Posted on Jun 13, 2006 (permalink)

    Steve, thanks for the quick reply and the suggestion, I'm looking forward to the new release. Another thing I just noticed is, sometime when I click on the top of the DatePicker panel to bring out the year picker panel, it does not always comes to the top layer, I mean it was hidden behind the original DatePicker panel. Is it a issue too?

  • Steve Steve admin's avatar

    Posted on Jun 14, 2006 (permalink)

    Yes Alan, unfortunately you have stumbled upon another problem. The good news is that this has been fixed as well. If these two problems are a showstopper for you we will gladly send you unofficial build with the fixes. Just open a support ticket with reference to this forum thread and we will attach it for you.

    Sorry for the inconvenience and thank you for the understanding.

    Best wishes,
    Steve
    the telerik team

  • Brian Limkemann Intermediate avatar

    Posted on Jun 27, 2006 (permalink)

    I have version 1.6 (RAD Controls 2006 Q1 SP2 for VS 2005) and still have the issue Alan was describing. In my case, I am using a shared calendar and if the DatePicker is blank, the calendar pops up to the MinDate (1/1/1900). Here is the ASPX of my DatePicker and Calendar:

    <radCln:RadDatePicker ID="xferDate" runat="server" SharedCalendarID="calO" AllowEmpty="true" MinDate="1/1/1800">

    <DateInput CatalogIconImageUrl="" CssClass="input" Description="" DisplayPromptChar="_" PromptChar=" " Title="" TitleIconImageUrl="" TitleUrl="" />

    <PopupButton ImageUrl="~/images/cal.gif" HoverImageUrl="~/images/cal.gif" CssClass="calImg" />

    </radCln:RadDatePicker>

    <radCln:RadCalendar ID="calO" runat="server" Skin="ten" DayNameFormat="FirstLetter" EnableMultiSelect="False" UseWeekNumbersAsSelectors="False" EnableRowSelectors="False" RangeMinDate="01/01/1900" RangeMaxDate="06/06/2079" />


    I found the problem. I had the MinDate in the DatePicker set to 1/1/1800 and the RangeMinDate in the Calendar set to 1/1/1900. Once I set them both to match everything works fine.

  • NetDeveloper1107 avatar

    Posted on May 19, 2010 (permalink)

    Even I have same problem with raddatepicker control. but no luck with this solution.

    I tried below solution

    rdDtCreatedDate.DatePopupButton.Attributes["onclick"] = string.Format("window['{0}'].TogglePopup(); return false;", rdDtCreatedDate.ClientID);

    I am getting error window.rdDtCreatedDate



  • Maria Ilieva Maria Ilieva admin's avatar

    Posted on May 19, 2010 (permalink)

    Hello,

    Could you please elaborate a little bit more on your problem? Does the issue appear with the latest RadControls for ASP NET Ajax? More information for your scenario will help us provide more to-the-point solution.


    Kind regards,
    Maria Ilieva
    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.

  • NetDeveloper1107 avatar

    Posted on May 19, 2010 (permalink)

    We are using Telerik 2008 version and the issue is that when we select date the focus is always taken on top of the page. (which I posted in diff forum) but i Found in this post some workaround provided so I  tried this and below solution(which was given in some of the post of telerik)

    rdDtCreatedDate.DatePopupButton.Attributes["onclick"] = string.Format("window['{0}'].TogglePopup(); return false;", rdDtCreatedDate.ClientID);

    I am getting error window.rdDtCreatedDate is null

    Is there any workaround for Raddatepicker version Telerik 2008 to resolve the position issue.

  • Maria Ilieva Maria Ilieva admin's avatar

    Posted on May 19, 2010 (permalink)

    Hello,

    Could you please also specify ff you are using Telerik Web.UI dll in your application? Also if it is convenient please open a regular support ticket and send us sample runnable application which demonstrates the issue. As soon as we replicate the [problem on our side we will provide more to-the-point solution.


    Kind regards,
    Maria Ilieva
    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.

  • sunita ahire avatar

    Posted on Jul 8, 2010 (permalink)

    can i set system date(or today`s date) as start date for RadDatePicher.........Every time when i select date start date should be today`s date?
    plz reply......

  • Maria Ilieva Maria Ilieva admin's avatar

    Posted on Jul 8, 2010 (permalink)

    Hi,

    You could use the following code to achieve the required functionality:

    protected void Page_Load(object sender, EventArgs e)
       {
         RadDatePicker1.MinDate = DateTime.Now;
           
       }


    Best wishes,
    Maria Ilieva
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

  • sunita ahire avatar

    Posted on Jul 8, 2010 (permalink)

    Thank You So Much ............this is so simple.............i wish i could have tried it.........
    it`s very helpful for me...........thank you.......

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Calendar > RadDatePickers sharing one RadCalendar: how to set default date for them to show?