2 Replies Latest reply on Jun 28, 2011 5:21 AM by Peter Gaggert

    RF 4.0: How to set rich:calendar Date via JavaScript ? [solved]

    Peter Gaggert Newbie

      Hi there,

       

      is it possible to set the date of a rich:calendar in a javascript function?

       

      something like :

       

      <script type="text/javascript">

           element = #{rich:element('calendar')};

       

           element.value = "2011/06/28 10:00:00";

      </script>

       

      I'm not very familiar with JS, but richfaces doc says that there is a setValue() function

      to archive what I want.

       

      edit:

       

      I tried :

       

      #{rich:component('calendar')}.setValue("01.03.2012");

       

      which lead to the JS error message : "submit is not defined"

       

      greets !