Skip to content

Commit

Permalink
gpld-inline-datepicker-only-for-mobile-devies.php: Added snippet fo…
Browse files Browse the repository at this point in the history
…r inline datepicker to work only on mobile devices.
  • Loading branch information
saifsultanc authored Aug 20, 2024
1 parent e51252f commit 60b2c19
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions gp-limit-dates/gpld-inline-datepicker-only-for-mobile-devies.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
/**
* Gravity Perks // GP Limit Dates // Inline Datepicker only on Mobile Devices.
* http://gravitywiz.com/documentation/gp-limit-dates/
*
* Instruction Video: https://www.loom.com/share/2e3e9838f2994b619402d18ff9f96114
*/
// Replace 278 with your Form ID, and 3 with your Date Field ID
add_filter( 'gpld_limit_dates_options_278_3', function( $options, $form, $field ) {
if ( ! wp_is_mobile() ) {
$options['inlineDatepicker'] = false;
}
return $options;
}, 10, 3);

0 comments on commit 60b2c19

Please sign in to comment.