$j('<style type="text/css"> ... lots of css rules ... </style>').appendTo('head'); </script> <input type="text" class="param" name="DTParam" id="DateTimePickerItem_2"/> <script>$j('#DateTimePickerItem_2').datetimepicker({dateFormat: 'yy-mm-dd', timeFormat: 'hh:mm:ss.l', showSecond: true, autoSize: true}) </script>