xmartlabs / Eureka

Elegant iOS form builder in Swift
https://eurekacommunity.github.io
MIT License
11.78k stars 1.33k forks source link

DateInlineRow set empty value? #2192

Closed fukemy closed 2 years ago

fukemy commented 2 years ago

Hi, i want to set empty value for DateInlineRow when the date is nil from server, i tried but not working, my sample code below:

<<< DateInlineRow() {
            $0.title = Language.get("End date")
            $0.dateFormatter?.locale = .current
            $0.dateFormatter?.dateFormat = "HH:mm dd/MM/yyyy"
            $0.tag = "end_date_row"
            if let endDate = taskDetail?.task?.Info?.RealEndDate{
                $0.value = Date(milliseconds: Int(endDate))
            }else{
                $0.value = nil
            }
        }

But the date is still showing like 08:00 01/01/1970

fukemy commented 2 years ago

my bad, my RealEndDate's property default = 0