2011-10-24 51 views

回答

1

使用constraints.timePattern屬性:

<input type="text" 
     id="startTime" 
     value="" 
     dojoType="dijit.form.TimeTextBox" 
     constraints="{timePattern:'h:mm a'}" /> 

儘管您仍然詢問TimeTextBox的值,但仍然會得到Date對象。要實際獲取格式爲HH:mm am|pm|的字符串,您必須事後手動將其轉換。

+0

thx ..................... – Delta