Datepicker Show Month After Year

Configure datepicker to display month after the year in the datepicker UI.

Instructions

  1. Install this snippet with our free Code Chest plugin. https://gravitywiz.com/gravity-forms-code-chest/

  2. This snippet will automatically apply to all Date fields in your forms.

Code

Filename: gw-datepicker-show-month-after-year.js

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**
 * Gravity Wiz // Gravity Forms // Datepicker Show Month After Year
 * https://gravitywiz.com/
 *
 * Configure datepicker to display month after the year in the datepicker UI.
 *
 * Instruction Video: 
 * 
 * https://www.loom.com/share/924747fb8cbd41869a79177843cd6f44
 *
 * Instructions:
 *
 * 1. Install this snippet with our free Code Chest plugin.
 *    https://gravitywiz.com/gravity-forms-code-chest/
 * 
 * 2. This snippet will automatically apply to all Date fields in your forms.
 */
gform.addFilter( 'gform_datepicker_options_pre_init', function ( options, formId, fieldId ) {
	options.showMonthAfterYear = true;
	return options;
});

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.