Date value not set into backing bean in the table has date input in thymeleaf

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Date value not set into backing bean in the table has date input in thymeleaf

Muthu
This post was updated on .


The Thymeleaf code is

  ..
<input type="date" th:value="*{form.snirawList[__${itemStat.index}__].etadate}" th:field="*{form.snirawList[__${itemStat.index}__].etadate}" > 


And the Spring boot code

 @PostMapping("/salesorder")
    public String homeFormSubmit(@ModelAttribute("form") SalesForm salesform, BindingResult bindingResult,
                        Model model, @RequestParam(value = "action", required = true) String action, HttpSession session) {
                       
                        for(SForm sform: salesform.getSFormList()) {
                                 System.out.println(sform.getEtadate());
                        }
                       
                        ...
                       
Here all other column values coming properly but only the date value always return null in java.

Is there any other way to implement this in thymeleaf?