4 Replies Latest reply on Apr 10, 2008 10:33 AM by hbmailinglist

    Rich:Calendar

    hbmailinglist

      Hello I'm trying to send an ajax event to the server when the date in my calendar changes...I haven't had much luck. Here is what I got:
      <rich:calendar id="clDate" value="#{bean.clDate}"
      valueChangeListener="#bean.clListener}">
      <a4j:support event="oninputchange" reRender="mainForm" />
      </rich:calendar>

      I've tried the following events: ondateselect, oninputchange, ondateselected, oninputchange...

      Some of them do send an event to the server but then in the listener evet.newValue returns the old value? For example if the date changes from 7th to 8th the new value is 7th?

      Thanks in addvance

        • 1. Re: Rich:Calendar
          ilya_shaikovsky

          Use onchanged calendar event. It fired both for time and date changes. And fired after change applied. So you'll get the current date at server side.

          Earlier it was ondateselected but unfortunatelly after time elements addition we've made some changes.

          • 2. Re: Rich:Calendar
            hbmailinglist

            Thank you for your response. However, I'm not able to invoke my valueChangeEvent listener...I'm wonder is my syntax correct?

            <rich:calendar id="dDate" value="#{bean.dDate}" valueChangeListener="#{bean.dDateChanged}">
            <a4j:support event="onchanged" />
            </rich:calendar>

            Thanks!

            • 3. Re: Rich:Calendar
              ilya_shaikovsky

              Yes.. it's correct.. But what RF version do you use?
              before 3.2.0 event was ondateselected. But in 3.2.0 GA events was corrected according to time addition.

              • 4. Re: Rich:Calendar
                hbmailinglist

                Thanks again! I'm using 3.1.x! I'll upgrade, thanks.