@@ -676,8 +676,9 @@ protected function getMcWDatePickerString($strId, $strKey, $rgxp)
676676 });
677677 </script> ' ;
678678 }
679- else
680- {
679+
680+ elseif (version_compare (VERSION ,'3.3.0 ' ,'< ' )) {
681+
681682 $ format = Date::formatToJs ($ GLOBALS ['TL_CONFIG ' ][$ rgxp . 'Format ' ]);
682683 switch ($ rgxp )
683684 {
@@ -709,6 +710,42 @@ protected function getMcWDatePickerString($strId, $strKey, $rgxp)
709710 });
710711 });
711712 </script> ' ;
713+
714+ }
715+
716+ else
717+ {
718+ $ format = Date::formatToJs ($ GLOBALS ['TL_CONFIG ' ][$ rgxp . 'Format ' ]);
719+ switch ($ rgxp )
720+ {
721+ case 'datim ' :
722+ $ time = ", \n timePicker:true " ;
723+ break ;
724+
725+ case 'time ' :
726+ $ time = ", \n pickOnly: \"time \"" ;
727+ break ;
728+
729+ default :
730+ $ time = '' ;
731+ break ;
732+ }
733+
734+ return ' <img src="system/modules/multicolumnwizard/html/img/datepicker.gif" width="20" height="20" alt="" id="toggle_ ' . $ strId . '" style="vertical-align:-6px;cursor:pointer;">
735+ <script>
736+ window.addEvent("domready", function() {
737+ new Picker.Date($("ctrl_ ' . $ strId . '"), {
738+ draggable:false,
739+ toggle:$("toggle_ ' . $ strId . '"),
740+ format:" ' . $ format . '",
741+ positionOffset:{x:-211,y:-209} ' . $ time . ',
742+ pickerClass:"datepicker_bootstrap",
743+ useFadeInOut:!Browser.ie,
744+ startDay: ' . $ GLOBALS ['TL_LANG ' ]['MSC ' ]['weekOffset ' ] . ',
745+ titleFormat:" ' . $ GLOBALS ['TL_LANG ' ]['MSC ' ]['titleFormat ' ] . '"
746+ });
747+ });
748+ </script> ' ;
712749 }
713750 }
714751
0 commit comments