diff --git a/static/js/settings_account.js b/static/js/settings_account.js index a38437029f..66f6cb42c4 100644 --- a/static/js/settings_account.js +++ b/static/js/settings_account.js @@ -70,6 +70,7 @@ exports.add_custom_profile_fields_to_settings = function () { var is_long_text = field_type === "Long text"; var is_choice_field = field_type === "Choice"; var is_user_field = field_type === "User"; + var is_date_field = field_type === "Date"; var field_choices = []; if (field_type === "Long text" || field_type === "Short text") { @@ -107,6 +108,7 @@ exports.add_custom_profile_fields_to_settings = function () { is_long_text_field: is_long_text, is_choice_field: is_choice_field, is_user_field: is_user_field, + is_date_field: is_date_field, field_choices: field_choices, }); $("#account-settings .custom-profile-fields-form").append(html); @@ -137,6 +139,9 @@ exports.add_custom_profile_fields_to_settings = function () { }); } }); + $(".custom_user_field .datepicker").flatpickr({ + altInput: true, + altFormat: "F j, Y"}); }; exports.set_up = function () { diff --git a/static/templates/settings/custom-user-profile-field.handlebars b/static/templates/settings/custom-user-profile-field.handlebars index a04cb77de5..26abf43f0c 100644 --- a/static/templates/settings/custom-user-profile-field.handlebars +++ b/static/templates/settings/custom-user-profile-field.handlebars @@ -15,6 +15,9 @@
+ {{else if is_date_field }} + {{else}} {{/if}}