Created
February 10, 2022 06:56
-
-
Save aimahdi/ffcd1d006485eeb79868a6cc13d962fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add extra settings to flatpickr calendar | |
function bleye_ff_custom_calendar_settings( $config, $settings, $form ) { | |
$start_of_week = get_option('start_of_week'); // get the option from the WP settings | |
$config['locale'] = ['firstDayOfWeek' => $start_of_week]; // add the config to flatpickr | |
return $config; | |
} | |
add_filter('fluentform/frontend_date_format', 'bleye_ff_custom_calendar_settings', 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment