日期格式处理

Controller:
@InitBinder
public void DataBinder(ServletRequestDataBinder binder){
binder.registerCustomEditor(Date.class,new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"),false));
}

Jsp:Jstl表达式
<fmt:formatDate value="${user.birthday}" pattern="yyyy-MM-dd"></fmt:formatDate>

<input type="datetime-local" name="checkdate" class="datepicker" />
原文地址:https://www.cnblogs.com/arvins/p/8418904.html