2011-12-03 7 views

答えて

2

ここで私は日付ピッカーを添付するdidInsertElementイベントを使用して、私のSC2のデモアプリケーション(Chililog

App.MyField = App.TextBoxView.extend(App.CriteriaFieldDataMixin, { 
    valueBinding: 'App.pageController.fromDate', 
    name: 'fromDate', 
    placeholder: 'yyyy-mm-dd', 
    disabledBinding: SC.Binding.from('App.pageController.isSearching').oneWay().bool(), 

    /** 
    * Attach date picker to text box 
    */ 
    didInsertElement: function() { 
     this._super(); 
     this.$().datepicker({ dateFormat: 'yy-mm-dd' }); 
    } 
}) 

でjQueryのデータ・ピッカーのために使用されるいくつかのコードです。このイベントは、DOM要素が挿入された後に発生します。

関連する問題