springboot thymeleaf模板:前端日期类型转换th:value=“${#dates.format(activity.getEndtime(),‘yyyy-MM-dd‘)}“

  • 阿里云国际版折扣https://www.yundadi.com

  • 阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6


    springboot thymeleaf模板:前端日期类型转换

    如果不转换,前端直接拿date的就会显示第一个的情况

    有用的话点点关注哦

    springboot thymeleaf模板:前端日期类型转换th:value=“${#dates.format(activity.getEndtime(),‘yyyy-MM-dd‘)}“_spring boot


    上代码

    <div class="input-daterange input-group">
    <input th:value="${activity.getEndtime()}" class="form-control js-datepicker" data-date-format="yyyy-mm-dd" type="text" name="starttime" placeholder="从">
    <span class="input-group-addon"><i class="mdi mdi-chevron-right"></i></span>
    <input th:value="${#dates.format(activity.getEndtime(),'yyyy-MM-dd')}" class="form-control js-datepicker" data-date-format="yyyy-mm-dd" type="text" name="endtime" placeholder="至">
    </div>

    其实就是这玩意

    th:value="${#dates.format(activity.getEndtime(),'yyyy-MM-dd')}"


  • 阿里云国际版折扣https://www.yundadi.com

  • 阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6
    标签: Spring