Cannot set width of DatePicker

3 posts, 0 answers
  1. Nilhan
    Nilhan avatar
    3 posts
    Member since:
    Jul 2012

    Posted 30 Jul 2012 Link to this post

    I'm having trouble setting up the width of DatePicker. There's no way in Kendo API to set this on initialization. I tried in-line style with !important attribute, but it only limits the width of text box keeping the lengthy wrapper unchanged.

    Is there a way around this?
  2. John DeVight
    John DeVight avatar
    209 posts
    Member since:
    Jan 2010

    Posted 09 Aug 2012 Link to this post

    Hi Nilhan,

    How about this:

    $("#datepicker").closest("span.k-datepicker").width(400);

    Regards,

    John DeVight
  3. Kendo UI is VS 2017 Ready
  4. Casey
    Casey avatar
    15 posts
    Member since:
    Jan 2012

    Posted 12 Aug 2012 Link to this post

    For me I just applied the datePicker to a standard input field and used style="width: 120px" and it worked fine for me.  Have you tried this route?

    Casey

    <input id="DatePicker" readonly="true" onchange="DoThisFunction();"  style="width: 120px;" onclick="$('#DatePicker').data('kendoDatePicker').open();"/>
Back to Top