Skip to content

Instantly share code, notes, and snippets.

@dbashford
Created January 5, 2015 19:17
Show Gist options
  • Save dbashford/baef18b8f5a51258d9b4 to your computer and use it in GitHub Desktop.
Save dbashford/baef18b8f5a51258d9b4 to your computer and use it in GitHub Desktop.
Date picker fix

line 1 of date-picker.hbs, change placeholder to YYYY.

{{input class="datepicker" placeholder="MM/DD/YYYY"}}

line 54/55 of date_picker_component.js, update format to YYYY and add new parseFormat

format: "MM/DD/YYYY",
parseFormat: ["MM/DD/YY", "MM/DD/YYYY"],

line 417 of pickday.js, change opts.format to opts.parseFormat

date = moment(opts.field.value, opts.parseFormat);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment