Last active
March 2, 2021 15:27
-
-
Save vfontjr/e6175678014012398c3b9874491cb9a6 to your computer and use it in GitHub Desktop.
This file contains 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
<script> | |
jQuery(document).ready(function($) { | |
"use strict"; | |
/* change the calendar start day when date field receives foucus */ | |
$('#field_zkbet').on('focus', function() { | |
/* get the radio button value */ | |
var selected_day = $('input[name="item_meta[286]"]:checked').val(); | |
/* apply the radio button's value to the firstDay option */ | |
$(this).datepicker('option', 'firstDay', selected_day); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment