0
問題は、ハンドルバーが入力を生成する前にdoc.readyが発生し、入力ピッカーを設定する必要があるということです。Sproutcore + handlebars + jquery-ui - ハンドルバーで生成された入力からdatepickerを作成する方法
良いイベントがありますか?
問題は、ハンドルバーが入力を生成する前にdoc.readyが発生し、入力ピッカーを設定する必要があるということです。Sproutcore + handlebars + jquery-ui - ハンドルバーで生成された入力からdatepickerを作成する方法
良いイベントがありますか?
ここで私は日付ピッカーを添付する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要素が挿入された後に発生します。