Merge pull request #694 from Alain-es/datepicker-custom-format

Datepicker custom format
This commit is contained in:
Shannon Deminick
2015-05-20 14:48:36 +10:00
3 changed files with 30 additions and 7 deletions

View File

@@ -23,9 +23,6 @@ namespace Umbraco.Web.PropertyEditors
private IDictionary<string, object> _defaultPreVals;
/// <summary>
/// Overridden because we ONLY support Date (no time) format and we don't have pre-values in the db.
/// </summary>
public override IDictionary<string, object> DefaultPreValues
{
get { return _defaultPreVals; }
@@ -60,5 +57,16 @@ namespace Umbraco.Web.PropertyEditors
}
}
protected override PreValueEditor CreatePreValueEditor()
{
return new DatePreValueEditor();
}
internal class DatePreValueEditor : PreValueEditor
{
[PreValueField("format", "Date format", "textstring", Description = "If left empty then the format is YYYY-MM-DD. (see momentjs.com for supported formats)")]
public string DefaultValue { get; set; }
}
}
}