Announcement Announcement Module
No announcement yet.
Adding a DateTime picker to webflow view Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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'}})); 
    but I get javascript error.

    How can I do?

    Many thanks,

  • #2
    SOLVED with jQuery

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