Announcement Announcement Module
Collapse
No announcement yet.
Can't set Value on input type with decoration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can't set Value on input type with decoration

    Hello, Below is an input field and a decoration declaration that lists time segments in that input field.

    I want a separate Javascript call that sets the value to a time I want. When I click submit the form post but this "beginTimeString" field is null.
    My javascript segment just calls form.beginTimeString.value = "12:00:00 a";
    The html shows the value in the form but not on the submit.
    What am I missing?
    Thanks,
    B


    <form:input path="beginTimeString" />

    <script type="text/javascript">
    Spring.addDecoration(new Spring.ElementDecoration({
    elementId : "beginTimeString",
    widgetType : "dijit.form.TimeTextBox",
    widgetAttrs : {constraints : {selector : "time", timePattern: "hh:mm:ss a", clickableIncrement: "T00:15:00", visibleIncrement: "T00:15:00"}, visibleRange: "T05:00:00", value : dojo.date.locale.parse(dojo.byId("beginTimeString" ).value,
    {selector : "time", timePattern: "hh:mm:ss a"}),
    serialize: function(d, options) {return dojo.date.locale.format(d,
    {selector:'time', timePattern:'hh:mm:ss a'}).toLowerCase();}, required : true }}));
    </script>

  • #2
    We figured it out.
    dijit.byId('beginDateString').setDisplayedValue(do cument.getElementById("startDate" + indx.toString()).innerHTML);
    Thanks!

    Comment

    Working...
    X