define([ "../../widgets/_ComplexValueWidget", "dojo/_base/declare", "dojo/date", "dojo/text!./templates/SurveyRunWidget.html" ], function(_ComplexValueWidget, declare, date, template) { return declare([_ComplexValueWidget],{ templateString: template, postCreate: function() { this.inherited(arguments); var endDateBox = this.endDateBox; this.own(this.startDateBox.on('change', function(value){ endDateBox.constraints.min = value; })); }, _getValueAttr: function() { var value = this.inherited(arguments); value.respondentCanDeleteOwnResponse = value.respondentCanDeleteOwnResponse.length > 0; return value; }, _setValueAttr: function(value) { value.respondentCanDeleteOwnResponse = value.respondentCanDeleteOwnResponse ? ["on"] : []; this.inherited(arguments); this.endDateBox.constraints.min = this.startDateBox.get('value'); } }); });