DatePicker Custom Footer Without Link

2 posts, 1 answers
  1. dwhite
    dwhite avatar
    12 posts
    Member since:
    Feb 2007

    Posted 13 Apr 2015 Link to this post

    I'm trying to use a custom footer in the KendoUI DatePicker, I'm able to do this, however it's always wrapped in the today link. For example:

     

    <a href="#" class="k-link k-nav-today" title="Monday, April 13, 2015">
        ... My Custom Footer Code ...
    </a>

    Is there a way to prevent my footer code from being wrapped in the link?

  2. Answer
    Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 15 Apr 2015 Link to this post

    Hi dwhite,

    This is not supported out of the box, however you can achieve similar results using the open event handler and manual DOM manipulations. For example: 
    <script id="footer-template" type="text/x-kendo-template">
        <strong>#=text#</strong>
    </script>
    <script>
    $("#datepicker").kendoDatePicker().getKendoDatePicker().one("open", function(e) {
      var t = kendo.template($("#footer-template").html());
      var dp = this;
      setTimeout(function(){
        dp.dateView.popup.wrapper.find(".k-footer").append(t({text: "testing"}));
      });
    });


    Regards,
    Alexander Popov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top