Created
May 30, 2018 13:21
-
-
Save thiras/bee808d21b343262cacd11fd7cef1223 to your computer and use it in GitHub Desktop.
kp.k12 date picker
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
function wpf_dev_datepicker_strings() { | |
?> | |
<script type="text/javascript"> | |
var Flatpickr = Flatpickr||{l10n: {}}; | |
Flatpickr.l10ns.default.firstDayOfWeek = 1; // Set first day of week (0=Sunday, 1=Monday, etc) | |
// Modify strings used for days of week. | |
Flatpickr.l10ns.default.weekdays = { | |
shorthand: ['Paz', 'Pzt', 'Sal', 'Crs', 'Prs', 'Cum', 'Cmr'], | |
longhand: ['Pazar', 'Pazartesi', 'Sali', 'Carsamba', 'Persembe', 'Cuma', 'Cumartesi'] | |
}; | |
// Modify strings used for months. | |
Flatpickr.l10ns.default.months = { | |
shorthand: ['Ocak', 'Subt', 'Mart', 'Nis', 'May', 'Haz', 'Tem', 'Agu', 'Eyl', 'Eki', 'Kas', 'Ara'], | |
longhand: ['Ocak', 'Subat', 'Mart', 'Nisan', 'Mayis', 'Haziran', 'Temmuz', 'Agustos', 'Eylul', 'Ekim', 'Kasim', 'Aralik'] | |
}; | |
</script> | |
<?php | |
} | |
add_action( 'wpforms_wp_footer_end', 'wpf_dev_datepicker_strings' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment