我想将日期分配给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
问问题
3342 次