Open swasher opened 10 years ago
Hi swasher the rigth way to set the optiones in the javascript object is that :
dateTimeOptions = { 'format': 'dd/mm/yyyy HH:ii P', 'autoclose': 'true', 'showMeridian' : 'true' } widgets = { 'datetime': DateTimeWidget(options = dateTimeOptions) }
all the options supported are reported in the documentation, https://github.com/asaglimbeni/django-datetime-widget#options
Let me knwo if this is what you need . Cheers
Sorry but no success. Can you add option setup on your demo page? And if you have time, may be you can inspect my forms here https://github.com/swasher/pdfupload/blob/master/workflow/forms.py
Thanks for your help.
Thank you for the suggest I will add an example also with the options paramter in any case you example have some strange things. fist of all , why are you using a Datewidget with a 'format': 'dd/mm/yyyy HH:ii P' ? you define the widget two times for the same field, where do you want to define it ? it is enagth one time I guess the second time is ignored becuase you define it directly ni the fileld without hte options parameter. please decide one place where you want to instantiate the widget.
Hi asaglimbeni! Your widget great and work fine with default settings. But attrs dont work for me. I'm trying do it in this way:
Nothing happens at any settings, widget run as default. Localization dont work too. In setting.py
Please help me tuning widget! Best regards