Announcement Announcement Module
Collapse
No announcement yet.
Date Picker recommendation Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Date Picker recommendation

    Hi

    I noticed that the latest datepicker recommendation was in 2007, surely something better and easier is now available.

    Could you recommend a small javascript datepicker that works nicely with Spring MVC and Spring Form? Thanks!

    Also, how would you do the conversion from the form to the JODA LocalDate format in my class? A link to a detailed example would be great!

    Many thanks

    Benoit

  • #2
    Hi,

    You can try using the scriptaculous which has a datepicker.js file. It works well with Spring MVC.

    -Hetal

    Comment


    • #3
      Thanks. I had a quick look at http://script.aculo.us but not sure where it is... would you have a url for it? Thanks!

      Comment


      • #4
        http://speckyboy.com/2008/04/26/20-t...-live-without/

        http://ajaxian.com/archives/datepick...-scriptaculous

        -Hetal

        Comment


        • #5
          Even this may help:-

          http://webscripts.softpedia.com/scri...ous-44063.html

          -Hetal

          Comment


          • #6
            Thanks a lot Hetal.

            How about doing the conversion from a JODA LocalDate to the form and back?

            When I create the Object used as command,
            Code:
            class Param {
            @NotNull
            private LocalDate date;
            ...}
            Controller
            Code:
            ...
            model.addAttribute("param", new Param(date));
            Code:
            <sf:form action="adjust.html" method="post"
            		commandName="param">
            <sf:input path="date" id="date" />
            ...
            </sf:form>
            It gets displayed as 14/01/2010 which is ok, although a bit weird since the toString() on a LocalDate does yyyy-mm-dd.

            But on the handler of adjust command, the object has a NULL date!

            Code:
            @RequestMapping(value = "/adjust", method = RequestMethod.POST)
            public String adjust(@Valid @ModelAttribute("param") final WebSwapProxyDelta parameter, final BindingResult result) {
            
            parameter.getDate() is null!
            Questions:
            1/ why is null? Surely I'm missing a conversion somewhere...
            2/ How come it was not validated (I have Hibernate Validator in the classpath)

            A pointer to an article / blog / end-to-end example with date/joda conversion would be great

            Many thanks

            B

            Comment

            Working...
            X