Focus event on MVVM

2 posts, 0 answers
  1. Best Doctors
    Best Doctors avatar
    4 posts
    Member since:
    Feb 2014

    Posted 14 Jan 2015 Link to this post

    Hi, my question is very simple... How can i bind the focus event in a text field or any other control using MVVM?

    I tried it using this way but it didn't work

    <input id="startDate" name="startDate" data-role="datepicker"  data-bind="value: selectedStart, events: { focus: EffectiveDateFocus }" />

    Thanks in advanced
  2. Kiril Nikolov
    Kiril Nikolov avatar
    2543 posts

    Posted 16 Jan 2015 Link to this post



    With MVVM you can bind events that are triggered by the widget, and in this case the Kendo UI DatePicker does not have focus event, therefore you can not bind to it. You can see all the DatePicker events listed here:



    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top