contao/test — Issue #2204: Controller::getDatePickerString() invalid javascript
Author: importer
Created: 2011-11-29 09:17:27+00:00
State: open
Labels: backend, Defect, Invalid

Hi Leo,

Here is a very obscure error but with a fix.
"missing : after property id" upon calling the method getDatePickerString() if you are attempting to generate the datepicker for a widget in a control array (for a custom widget isotope uses as part of core functionality). Occurs in Chrome, IE and FF.

the bug occurs here:
window.addEvent('domready', function() { new Calendar({ ctrl_variant_attributes[eventDate]: 'Y-m-d' }, { navigation: 2, days: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'], months: ['January','February','March','April','May','June','July','August','September','October','November','December'], offset: 0, titleFormat: 'l, dS of F Y' }); });

particularly, ctrl_variant_attributes[eventDate]: 'Y-m-d' is throwing the error.

the fix is outlined here:
http://unethicalblogger.com/node/170 - find the section "missing : after property id" for an explanation and solution.

--- _Originally created by fbliss on June 29th, 2010, at 06:39pm (ID 2204)_