mobiscrollでonBeforeShowイベントを呼び出すにはどうすればよいですか?
$('#starttime').mobiscroll('setValue', value).time({
theme: 'jqm',
display: 'modal',
mode: 'clickpick',
stepMinute: 10,
onBeforeShow:
});
表示される直前に時間を設定する必要があります。ドキュメントの準備ができているときにそれを行おうとすると、入力フィールドはまだ値で準備ができていません...
編集
私は試した:
$('#starttime').mobiscroll('setValue', value).time({
theme: 'jqm',
display: 'modal',
mode: 'clickpick',
stepMinute: 10,
onBeforeShow: function(html, inst) {
start = $('#starttime').val();
var a = moment();
var value = a.format('h:mm A');
}
});
しかし、エラーが発生します:'値が定義されていません'..。