Skip to content

Issue with Date/Time Site Column with default in Grid View #649

@sympmarc

Description

@sympmarc

When provisioning a Date/Time Site Column which has its default set to Today, the column is provisioned fine. But when it's used in a list in grid view, the text [today] shows in the cell rather than today's date. This may well be a Lists bug somehow, but creating the column manually works fine, as does turning off/on the default after provisioning, so I'm thinking there's something slightly different in how it is provisioned.

Here's an example of the XML exported by the engine:

        <Field DisplayName="Date Assigned" Type="DateTime" Required="FALSE" ID="{e0049288-dbfe-4fa0-86c7-cf32344b3108}" SourceID="{8347ba40-1814-4a57-b812-2c7dca580b0b}" StaticName="DateAssigned" Name="DateAssigned" Group="_GroupName" CustomFormatter="" EnforceUniqueValues="FALSE" FriendlyDisplayFormat="Disabled" Format="DateOnly" Indexed="FALSE" CalType="0">
          <Default>[today]</Default>
        </Field>

and an example of the behavior:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions