Results 1 to 2 of 2

Thread: Adding a DateTime picker to webflow view

  1. #1
    Join Date
    Jun 2009
    Location
    Vicenza, Italy
    Posts
    84

    Default Adding a DateTime picker to webflow view

    Hi everybody,
    I'm trying to add a date picker to a webflow view inside a Spring Roo project.
    I thought it was sufficient to add
    HTML Code:
    <field:datetime ..... />
    to my JSPX, but it is not.

    I've tried to add some script:

    HTML Code:
    <script type="text/javascript">dojo.require('dijit.form.DateTextBox');</script>
    <field:datetime id="dt_inception" label="Date" field="inception" dateTimePattern="" />
    <script type="text/javascript">
    Spring.addDecoration(new Spring.ElementDecoration({elementId : 'dt_inception', widgetType : 'dijit.form.DateTextBox', widgetAttrs : {promptMessage: 'Enter The Date', invalidMessage: 'Please enter valid The Date', required: false, constraints: {datePattern : 'd-MMM-yyyy', required : false}, datePattern : 'd-MMM-yyyy'}})); 
    </script>
    but I get javascript error.

    How can I do?

    Many thanks,
    Stefano

  2. #2
    Join Date
    Jun 2009
    Location
    Vicenza, Italy
    Posts
    84

    Default SOLVED with jQuery

    Gave up.
    Solved with jQuery in less than 5 minutes.
    Sorry for the OT but.... the question now is: why dojo?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •