How to add Date Picker in Dynamic Add/Remove Custom Fields (Repeater Fields)

WordPress has the jQuery datepicker already included. So you can enqueue the default WP script. However, as far as I know, WP doesnt include the necessary styling for the datepicker! So try to enqueue the WP script, and for example, styles from external source: function my_datepicker_enqueue() { wp_enqueue_script( ‘jquery-ui-datepicker’ ); // enqueue datepicker from WP … Read more

Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?

There’s no native “Time Interval” field type in ACF, but you could: Use a third-party custom field like the “Date Range Picker” provided by ACF Extended (it’s a commercial plugin that adds features to ACF). Use 2 distinct native Date Picker fields for “from” and “to”, possibly inserted inside a Group. You may take advantage … Read more

DatePicker in Woocommerce (My Account) Registration [closed]

Don’t include jquery from any other source, it will create conflict. Bcoz jQuery is pre bundled in wordpress by default. For your question, add an id or class to the input element then add the datepicker based on the class. For example <input type=”text” class=”da_test” value=”” > <script type=”text/javascript”> $(window).load(function() { $(‘.da_test’).glDatePicker(); }); </script> This … Read more

How to allow multiDatesPicker in wp admin post type?

try now this code <?php function load_requirements() { wp_register_script(‘mdp’, ‘https://cdn.rawgit.com/dubrox/Multiple-Dates-Picker-for-jQuery-UI/master/jquery-ui.multidatespicker.js’); wp_enqueue_script(‘mdp’); } add_action(‘admin_head’, ‘load_requirements’);?> jQuery(document).ready(function($) { $(‘.datepicker’).multiDatesPicker(); });

Group/list/sort custom post type posts by date in tabs from acf datepicker field

It’s probably best to loop through your posts two times. Once to group them by year and once to print the posts. Something like this: (not tested) $formatted_posts = array(); while ( $subsQuery->have_posts() ) : $subsQuery->the_post(); $year = get_field(‘year’); // add them to formatted_posts array and group by year $formatted_posts[$year][] = $post; endwhile; foreach($formatted_posts as … Read more

Restrict days in bootstrap datepicker using checkboxes in submenu

———— EDIT -> PROBLEM SOLVED ——— MY CODE WordPress submenu/HTML code <?php add_action( ‘admin_menu’, ‘reserveringsformulier_add_submenu_gesloten’ ); function reserveringsformulier_add_submenu_gesloten() { add_submenu_page( ‘edit.php?post_type=reserveringen’, __( ‘Gesloten dagen Restaurant’, ‘Gesloten dagen’ ), __( ‘Gesloten dagen’, ‘Gesloten dagen’ ), ‘manage_options’, ‘gesloten_restaurant’, ‘gesloten_restaurant_inger_display’ ); } function gesloten_restaurant_inger_display() { function gesloten_restaurant_inger_display() { if (isset($_POST[‘submit_datum_gesloten’])) { if (isset($_POST[‘maandag’])) { update_option(‘maandag’, $_POST[‘maandag’]); $maandag = … Read more