0
我想將DD-MM-YYYY
格式的日期字段分配給日期字段。那是我收到的字符串Closure_Date
其中包含日期格式爲DD-MM-YYYY
。我想將該日期分配給日期字段,如 dtCloseDate.selectedDate=new Date(Closure_Date);
在這種情況下如果Closure_Date
包含16/11/2011
它需要16個月份,所以需要12個月並添加剩餘的4個月並返回04/11/2012
。 我的問題是如何將日期(DD-MM-YYYY)分配給DateField? 如果我使用Dateformatter(DD-MM-YYYY),如dtCloseDate.selectedDate=new Date(Dateformatter.format(Closure_Date));
返回NaN
將日期指定給DateField
+1謝謝。有用 !!... :) –