Mobile button bound to observable (MVVM)

3 posts, 0 answers
  1. Jeremy Wiebe
    Jeremy Wiebe avatar
    11 posts
    Member since:
    Jun 2012

    Posted 12 Sep 2012 Link to this post

    I am trying to bind a Kendo mobile button to a javascript model (kendo.observable).  I'd like to have the button disabled until the model says everything is valid.  

    I've created a small jsFiddle that shows my problem.   Should the mobile button be "bindable" to a kendo observable model?

    http://jsfiddle.net/jeremy_wiebe/SxYCb/ 

    Thanks,
  2. Alex
    Alex avatar
    23 posts
    Member since:
    Aug 2012

    Posted 14 Sep 2012 Link to this post

    In my project I do:

    <button data-role="button" data-bind="enabled:canClick">Caption</button>

    see also
    http://www.kendoui.com/forums/mobile/button/how-to-disable-mobile-button-suggestion.aspx 
  3. Kendo UI is VS 2017 Ready
  4. Jeremy Wiebe
    Jeremy Wiebe avatar
    11 posts
    Member since:
    Jun 2012

    Posted 16 Sep 2012 Link to this post

    Thanks Alex.  Using a <button> works great.  

    I'd be curious to hear from the Kendo team why they choose to use <a /> for the Kendo Mobile button instead of the native <button>.  Perhaps better control over styling?  I also looked through the code and I can't figure out exactly how you'd disable the <a /> button in the binders.
Back to Top