PluginProbe
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor / 3.9.8
User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor v3.9.8
4.0.3 4.0.2 4.0.1 4.0.0 3.16.6 3.16.5 3.16.4 3.16.3 3.16.2 3.16.1 3.16.0 3.15.9 3.9.9 3.9.5 3.9.6 3.9.7 3.9.8 1.1.7 1.1.8 1.1.9 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 All 341 releases
profile-builder / admin / advanced-settings / includes / fields / datepicker-starts-monday.php

datepicker-starts-monday.php in User Profile Builder – Beautiful User Registration Forms, User Profiles & User Role Editor 3.9.8, at admin/advanced-settings/includes/fields/datepicker-starts-monday.php

27 lines 851 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 function wppb_toolbox_datepicker_starts_on_monday( $output, $form_location, $field, $user_id, $field_check_errors, $request_data ){
4 $field_id = $field['meta-name'];
5
6 $script = '<script>
7 jQuery(function(){
8 jQuery("#'. $field_id . '").each( function(){
9 var currentDatepicker = this;
10 jQuery( currentDatepicker ).datepicker("destroy");
11 jQuery( currentDatepicker ).datepicker({
12 inline: true,
13 changeYear: true,
14 changeMonth: true,
15 dateFormat: jQuery( currentDatepicker ).data("dateformat"),
16 firstDay: 1,
17 yearRange: "c-100:c+30"
18 });
19 });
20 });
21 </script>';
22
23 return $output . $script;
24 }
25 add_filter( 'wppb_output_form_field_datepicker', 'wppb_toolbox_datepicker_starts_on_monday', 20, 6 );
26 add_filter( 'wppb_admin_output_form_field_datepicker', 'wppb_toolbox_datepicker_starts_on_monday', 20, 6 );
27