Try our conversational search powered by Generative AI!

Change display of value i PropertyList<T>

Vote:
 

Having a PropertyList whose class has DatePicker and TimePicker

The class looks like this:

[Display(Order = 100)]
[UIHint("DatePicker")]
public DateTime? Date { get; set; }

[Display(Order = 200)]
public string Description { get; set; }

[Display(Order = 300)]
[UIHint("TimePicker")]
public DateTime? OpenTime { get; set; }

[Display(Order = 400)]
[UIHint("TimePicker")]
public DateTime? CloseTime { get; set; }

[Display(Order = 500)]
public bool Closed { get; set; }

The DatePicker has it ClientEditingClass set to dijit/form/DateTextBox and TimePicker has the ClientEditingClass set to dijit/form/TimeTextBox and both have a DisplayTemplate set to only show the Date or Time. Works great in editmode but when viewing the result of added lines in the PropertyList display both Date and Time for both of these resulting in the TimePicker displaying 1970-01-01 and the time and the DatePicker displaying 01:00 as the time.

Is there a way of fixing the display of these without the need of creating my own custom dojo CollectionEditor or if that is the only way, how would such dojo/dijit look like?

#208633
Oct 29, 2019 11:36
Vote:
 

I think you'll have to go with dojo. Have a look at this nice blogpost:
https://gregwiechec.com/2015/12/propertylist-with-images/

#208636
Oct 29, 2019 12:22
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.