Spring 3.1 Web MVCフォームでは、次のフィールドを使用して、日付ピッカーから日付を取得し、フォームで定義されたフィールドをString
. すべての値を取得していますが、日付フィールドを取得していません。
初挑戦
<form:input id="fromDate" class="mydate" path="fromDate" size="10" maxlength="10" />
<script type="text/javascript">
Spring.addDecoration(new Spring.ElementDecoration({elementId : 'fromDate', widgetType : 'dijit.form.DateTextBox', widgetAttrs : {promptMessage: 'Enter From Date', invalidMessage: 'Please enter valid From Date', required: false, constraints: {datePattern : 'dd/MM/yyyy', required : false}, datePattern : 'dd/MM/yyyy'}}));
</script>
2 回目の試行
<input id="toDate" class="mydate" path="toDate" size="10" maxlength="10" />
<spring:bind path="schemeQuantity.toDate">
${status.value}
</spring:bind>
<script type="text/javascript">
単純な HTML 入力タグを使用して、Spring MVC でバインドすることは可能ですか。