Prepopulate date field based on a condition without modifying the source code