How to hide date in timeline view of rad scheduler

9 posts, 1 answers
  1. Ano
    Ano avatar
    11 posts
    Member since:
    Jun 2011

    Posted 03 Sep 2012 Link to this post

    How to hide date  in timeline view only of rad scheduler
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Sep 2012 Link to this post

    Hi Ano,

    Try setting ShowDateHeaders property of TimelineView to false to hide the DateHeaders in the TimelineView of RadScheduler.

    ASPX:
    <telerik:RadScheduler ID="RadScheduler1" runat="server" ............. >
        <TimelineView ShowDateHeaders="false" />
    </telerik:RadScheduler>

    Hope this helps.

    Regards,
    Princy.
  3. Ano
    Ano avatar
    11 posts
    Member since:
    Jun 2011

    Posted 03 Sep 2012 Link to this post

    Thanks princy,
    but i already done by setting the ShowDateHeaders="false" in timeline view.
    but my problem i want to to hide date display(showing the middle,like this format 6/28/2012 - 6/28/2012) in day,month,week,timeline button row.that too hide only in timeline view,rest all other view we needed that one.
  4. Answer
    Plamen
    Admin
    Plamen avatar
    2958 posts

    Posted 04 Sep 2012 Link to this post

    Hi Ano,

     
    Here is one way to achieve this with javascript by using the client object of RadScheduler:

    <script type="text/javascript">
           function pageLoad() {
               var $ = $telerik.$;
               var scheduler = $find('<%=RadScheduler1.ClientID %>');
               if (scheduler.get_selectedView() == Telerik.Web.UI.SchedulerViewType.TimelineView) {
                   $(".rsHeader h2").hide();
               }
               else {
                   $(".rsHeader h2").show();
               }
           }
       </script>

    Hope this will be helpful.

    All the best,
    Plamen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  5. Ano
    Ano avatar
    11 posts
    Member since:
    Jun 2011

    Posted 04 Sep 2012 Link to this post

    thanks a lot,that worked!!!!!!!!!!!!!!!!!!!!!
  6. Ano
    Ano avatar
    11 posts
    Member since:
    Jun 2011

    Posted 05 Sep 2012 Link to this post

    How we can change the "start time" label text to "start date" in new appointment popup of rad scheduler
  7. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 06 Sep 2012 Link to this post

    Hi Ano,

    Try the following JQuery to achieve your scenario.

    JS:
    <script type="text/javascript">
        $(document).ready(function (event) {
            $('.rsTimePick > label').text("Start date");
            $('.rsEndTimePick > label').text("End time");
        });
    </script>

    Hope this helps.

    Regards,
    Princy.
  8. Ano
    Ano avatar
    11 posts
    Member since:
    Jun 2011

    Posted 06 Sep 2012 Link to this post

    this script executed only on page load.but my issue is new appointment comes as popup when we right click on rad scheduler and select new appointment.how we can execute this script when we select new appointment
  9. Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    2035 posts

    Posted 06 Sep 2012 Link to this post

    Hello Ano,

    This piece of JavaScript code that you will found below is working fine on each appointment insert and update.

    your aspx file

    <telerik:RadScheduler runat="server" ID="RadScheduler1"  OnClientFormCreated="RadScheduler1_OnClientFormCreated">         
    </telerik:RadScheduler>

    and your JavaScript code

    function RadScheduler1_OnClientFormCreated(sender, eventArgs) {
                  var $ = $telerik.$;
                  var mode = eventArgs.get_mode();
                  if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert ||
                      mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
                  $('.rsTimePick > label').text("Start date");
                }
               }

    I hope you will find this helpful.


    Regards,
    Boyan Dimitrov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top