You have to parse your string to a DateTime type. Only then you can compare with another DateTime field, like dueDate is for you.
The function you need is parseDateTime[UTC], so something like this could be used:
$currentObj/dueDate = parseDateTime('03-08-2017','dd-MM-yyyy', dateTime(2017))
parseDateTime[UTC]
Takes a string and tries to parse it. If it fails and a default value is specified, it returns the default value. Otherwise, an error is raised. The function parseDateTime
uses the user’s timezone and parseDateTimeUTC
uses the UTC calendar.
Input parameters
Output
The parsed date, or the default value if a date could not be parsed. Type: DateTime
I don't know if this function supports conditional visability, but you could try using:
$currentObj/dueDate = dateTime(2017, 8, 3)
or dateTimeUTC, depending if your attribute is localized or not.
See Date creation for more information