Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
I used an old solution for this once. Haven't tried it in newer version though:
[EditorDescriptorRegistration(TargetType = typeof(string), UIHint = "DateOnly")] public class DateEditorDescriptor : EditorDescriptor { /// <summary> /// Initializes a new instance of the class. /// </summary> public DateEditorDescriptor() { //The default editing class that will be used in forms editing mode. ClientEditingClass = "dijit.form.DateTextBox"; } public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable<Attribute> attributes) { base.ModifyMetadata(metadata, attributes); //Define what kind of editor we want to have, in this case we want to create an inline editor. This is used //when the user is in "on page editing" mode. metadata.CustomEditorSettings["uiWrapperType"] = "inline"; //Specify the class for a custom editor responsible for the actual editing. //If not defined the default (forms) editor will be used. metadata.CustomEditorSettings["uiType"] = "dijit.form.DateTextBox"; } } [Editable(true)] [Display( Name = "Event Date", Description = "The Event Start Date will be shown in the Page", GroupName = SystemTabNames.Content, Order = 201)] [UIHint("DateOnly")] public virtual string EventDate { get; set; }
Hi,
Can anyone please give me an example of how can i use UI Hint for only Date selection (no time) using DateTime property.
Regards,
Vibhanshu Mirani