Eliminate Date Picker Drop Downs
Eliminate Date Picker Drop Downs
Is there a way to completely eliminate the date picker drop down menus? Using these it is possible to inadvertently create dates that don't possibly exist such as February 30, or November 31. Using the graphic calendar is the best method and I would like to us that exclusively on my apps.
Re: Eliminate Date Picker Drop Downs
Hi,
you can add to the hooks/tablename-dv.js file
you can add to the hooks/tablename-dv.js file
Code: Select all
$j(function() {
$j('.date_combo').hide();
})
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Eliminate Date Picker Drop Downs
That worked at removing the drop downs which is absolutely great. However, once a date is selected using the calendar, I still need to have the selected date shown. Sorry to be such a pain in the @#$!
Re: Eliminate Date Picker Drop Downs
Hi,
try to add
replace FIELD with the fieldname that you use for you field.
try to add
Code: Select all
$j('#FIELD').on('change',function(e) {$j('#fd-but-FIELD').text($j('#FIELD-date-picker-hover').attr('title'))})
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Eliminate Date Picker Drop Downs
I don't know if I've done it correctly. As I have it here, the date is displayed in DV until I save or change anything. The date is stored in the database but still not visible in DV once anything on the screen changes.
Code: Select all
$j(function() {
$j('.date_combo').hide();
})
$j('#date').on('change',function(e) {$j('#fd-but-date').text($j('#date-date-picker-hover').attr('title'))})
Re: Eliminate Date Picker Drop Downs
Actually nothing, I thought you could add the pieces together.
try
try
Code: Select all
$j(function() {
$j('.date_combo').hide();
if ($j('#date').val != "") $j('#fd-but-date').text($j('#date-date-picker-hover').attr('title'));
})
$j('#date').on('change',function(e) {$j('#fd-but-date').text($j('#date-date-picker-hover').attr('title'))})
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Eliminate Date Picker Drop Downs
Hi,
I tried that new code but get the same thing. The date picker (calendar style) is displayed and the date is shown until I save. The date is properly stored but not visible in DV.
Thank you for all the effort!!
Ray
I tried that new code but get the same thing. The date picker (calendar style) is displayed and the date is shown until I save. The date is properly stored but not visible in DV.
Thank you for all the effort!!
Ray
Re: Eliminate Date Picker Drop Downs
Hi,
sorry, yes that was not quite correct.
Try
Format the date with the
$j('#date-dd').val()+'-'+$j('#date-mm').val()+'-'+$j('#date').val()
as you need it.
sorry, yes that was not quite correct.
Try
Code: Select all
$j(function() {
$j('.date_combo').hide();
if ($j('#date').val() != "") $j('#fd-but-date').text($j('#date-dd').val()+'-'+$j('#date-mm').val()+'-'+$j('#date').val());
})
$j('#date').on('change',function(e) {$j('#fd-but-date').text($j('#date-date-picker-hover').attr('title'))})
$j('#date-dd').val()+'-'+$j('#date-mm').val()+'-'+$j('#date').val()
as you need it.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Eliminate Date Picker Drop Downs
Hi Pascal,
It's been a while since I looked at this topic.
The code is working and I have an additional help question around it. Is there a way to align the date picker to the left of the screen. Currently it is aligned to the right with a large blank space to the left of it. Thank you as always!
Ray
It's been a while since I looked at this topic.
The code is working and I have an additional help question around it. Is there a way to align the date picker to the left of the screen. Currently it is aligned to the right with a large blank space to the left of it. Thank you as always!
Ray
Re: Eliminate Date Picker Drop Downs
Hi Ray,
which version of AppGini are you using. There have been serval changes in the different versions lately.
which version of AppGini are you using. There have been serval changes in the different versions lately.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Eliminate Date Picker Drop Downs
Hello Pascal,
I'm currently using version 5.97. That's only because I found a bug in the new version that affects iframe embed codes. Every time you save a record that has an iframe in it the word "Sandbox" is inserted. A single insertion of that causes no issues. But it happens every time you save the record. So save 10 times Sandbox 10 times. That breaks the embed code.
I'm currently using version 5.97. That's only because I found a bug in the new version that affects iframe embed codes. Every time you save a record that has an iframe in it the word "Sandbox" is inserted. A single insertion of that causes no issues. But it happens every time you save the record. So save 10 times Sandbox 10 times. That breaks the embed code.
Re: Eliminate Date Picker Drop Downs
Hi Ray,
for 5.97 you can try:
If you upgrade to >= 22.11 this will not work any more. You need to adopt it.
for 5.97 you can try:
Code: Select all
$j(function() {
$j('.date_combo').hide();
$j('.form-group.'+AppGini.currentTableName()+'-date .btn-group').removeClass('pull-right');
if ($j('#date').val() != "") $j('#fd-but-date').text($j('#date-dd').val()+'-'+$j('#date-mm').val()+'-'+$j('#date').val());
})
$j('#date').on('change',function(e) {$j('#fd-but-date').text($j('#date-date-picker-hover').attr('title'))})
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.