I am trying to Bind UIDatePicker with a variable that is coming straight from Server but the issue is variable has a type of TimeStamp and UIDatePicker requires a type of Date.
if(self.shouldShowDatePicker)
{
DatePicker(selection:self.$taskData.fields[index].dateField.valueTime , displayedComponents: .date)
Text("DatePicker")
}
Now I know that this variable self.$taskData.fields[index].dateField.valueTime is of TimeStamp type, and since you can see that this variable belongs to a very complex array of fields so I cannot alter the structure. Please let me know what is the possible solution. Thanks