[Solved] Can not set the Datepicker, the error goes down [closed]


Swift thinks you’re trying to set the class DataFormatter to itself, which you are. Always use lowerCamelCase for function and variable names. Also, you forgot some parenthesis after DateFormatter.

Replace line 14 with this:

let dateFormatter = DateFormatter()

solved Can not set the Datepicker, the error goes down [closed]