U4-1428 - No empty value is saved using Datecontrol (Date Picker)

Created by Joost van den Berg 10 Jan 2013, 13:39:28 Updated by Sebastiaan Janssen 15 Jan 2013, 13:12:24

  1. add date picker to dt
  2. fill date picker with value
  3. save
  4. open and clear it
  5. save and reopen

Comments

Andy Butland 10 Jan 2013, 21:57:46

Had a look at this one. The problem is in umbraco.cms.businesslogic.web.Document.Save(). After saving a Date Picker with no date, the property is null. This check therefore omits saving the value:

foreach (var property in GenericProperties) { if (property.Value == null) continue;

            Content.SetValue(property.PropertyType.Alias, property.Value);
        }

Removing that null check fixes this issue - the date picker saves OK with a null date. But presuming it's there for some other reason not sure of the side-effects here.


Sebastiaan Janssen 15 Jan 2013, 13:12:18

Fixed in changeset 573857f7580b


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category: UI

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.0.0

Due in version: 6.0.0

Sprint:

Story Points:

Cycle: