Post
by pfrumkin » 2020-05-12 23:14
Hi Jan, All,
I can't seem to get the .toDatepicker() to take. I have the following line of code
new AppGiniField("Donation_Date").toDatepicker();
I have specified the type DateTime. I can see it in FF debugger go to the AppGiniHelper.min.js library but it seems to get overwritten because the image shows the time (in addition to date) and it puts the time in the textbox after selection. I have applied the Data Formats as you have documented. I have another DateTime field on the form that for now I'm using as a control, not using AppGiniHelper, and it behaves the same way, shows some other datepicker. I know the AppGiniHelper libary is working because I have changed the title and icon on the main menu, and I even added a .hide() line right below this line, just to test, and the field does get hidden. My problem seems to be specific to toDatepicker.
I'm not good enough at JQuery to do much debugging. It seems to me that there is some order of operations and the datepicker from the helper is superceded. I did a view source and I see
jQuery('#Donation_Date').addClass('always_shown').parents('.input-group').datetimepicker({ toolbarPlacement: 'top', sideBySide: true, showClear: true, showTodayButton: true, showClose: true, icons: { close: 'glyphicon glyphicon-ok' }, format: AppGini.datetimeFormat('dt') , locale: 'en' });
identical except for the field name to the other DateTime field on the form.
Any help appreciated. Thanks.
Paul
Using BigProf AppGini 5.82