chetang / calendardateselect

Automatically exported from code.google.com/p/calendardateselect
Other
0 stars 0 forks source link

Does not work with FCK Editor textarea #157

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
i have two fields in my form. a textarea for a message and a 
calendar_date_select for an 
expiration date. if i take out the fckeditor_textarea the calendar_date_select 
works fine. with it, 
the javascript error is: Value undefined (result of expression $(parent).build) 
is not object.
http://talent.local/javascripts/calendar_date_select/calendar_date_select.js?123
2429969 (line 
129)

This seems to be a Safari-only problem. Works fine in Firefox.

any ideas?

source:

      <li>
        <%= f.label :message %><br />
        <%= fckeditor_textarea("news", "message", :toolbarSet => 'Simple', :width => '100%', 
:height => '200px') %>
      </li>
      <li>
        <%= f.label :expiration %><br />
        <%= f.calendar_date_select :expiration, :valid_date_check => "date.stripTime() > (new 
Date()).stripTime()" %>
      </li>

rendered html:

      <li> 
        <label for="news_message">Message</label><br /> 
        <textarea id='news__message_editor'   name='news[message]'></textarea> 
<script type="text/javascript"> 
//<![CDATA[ 
var oFCKeditor = new FCKeditor('news__message_editor', '100%', '200px', 
'Simple'); 
oFCKeditor.BasePath = "/javascripts/fckeditor/"
oFCKeditor.Config['CustomConfigurationsPath'] = '/javascripts/fckcustom.js'; 
oFCKeditor.ReplaceTextarea(); 

//]]> 
</script> 
      </li> 
      <li> 
        <label for="news_expiration">Expiration</label><br /> 
        <input id="news_expiration" image="calendar_date_select/calendar.gif" 
name="news[expiration]" size="30" type="text" /> <img alt="Calendar" 
onclick="new 
CalendarDateSelect( $(this).previous(), {valid_date_check:function(date) { 
return(date.stripTime() 
&gt; (new Date()).stripTime()) }, year_range:10} );" 
src="/images/calendar_date_select/calendar.gif?1233156955" style="border:0px; 
cursor:pointer;" /> 
      </li> 

Original issue reported on code.google.com by erbmi...@gmail.com on 10 Feb 2009 at 6:44

GoogleCodeExporter commented 8 years ago
sorry, I don't have any clue why this might be happening, and unfortunately, I 
don't
have time to diagnose it for you.

Original comment by timchar...@gmail.com on 20 Feb 2009 at 5:46