I am unable to enter nil value to optional Date field.
This is my model class:
class Oak: Object {
dynamic var assignmentDate = Date()
dynamic var readyDate: Date?
}
As you can see, field readyDate is defined as optional and allows nil values. Indeed it can have nil value if it created in code. But if I create such object in Realm Browser, readyDate gets assigned with current timestamp and I am unable to change it to nil.
At this screenshot, first and second rows are created in code, you can see nil date in second row.
Third row is created in Realm Browser, and you can see that 'readyDate' is equal to 'assignmentDate`.
Hey @evgeny-sureev! Sorry for a delay with this. Unfortunately there is no way to set nil for date values right now. It's just a UI limitation and we will try to fix it.
I am unable to enter nil value to optional Date field.
This is my model class:
As you can see, field
readyDate
is defined as optional and allows nil values. Indeed it can have nil value if it created in code. But if I create such object in Realm Browser,readyDate
gets assigned with current timestamp and I am unable to change it to nil.At this screenshot, first and second rows are created in code, you can see nil date in second row.
Third row is created in Realm Browser, and you can see that 'readyDate' is equal to 'assignmentDate`.
How can I change Date value to be nil?