SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.25k stars 1.01k forks source link

display of date-values changes within JSON formatted view #9901

Open MSFT-klpinhac opened 2 months ago

MSFT-klpinhac commented 2 months ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

Declarative list formatting

Developer environment

None

What browser(s) / client(s) have you tested

Additional environment details

No response

Describe the bug / error

The formatting of the date-values used as categories / groups changes, from "YYYY-MM-DD" to "MM/DD/YYYY hh:mm"

Steps to reproduce

a custom SharePoint-List with data from an RSS-Feed has been created, with the following columns:

image

The view of the SharePoint-List has been grouped by the field "pubDate":

image

The display of a SharePoint-List with has been customized using the JSON available at: https://github.com/pnp/list-formatting/tree/master/view-samples/faq-accordion Please note: only the reference of the field "Answer" has been updated to field "Title", no other changes have been made

image

If you expand a group / date in the view, the entries within that group ( i.e. from that date) become visible

image

if you scroll up, expand a second group / date above the first expanded group and collapse that second group / date again, then the date-value of the first group is displayed in a different way:

image

In the console of Microsoft Edge Version 128.0.2739.42 (Official build) (64-bit), no error shows up.

Expected behavior

The formatting of the date-values used as categories / groups should NOT change

arkogupta commented 2 months ago

@MSFT-klpinhac What are the settings of the PubDate column? Can you please add a screenshot of the Edit column panel?

arkogupta commented 2 months ago

Also, could you please check your build number using _spModuleLink.buildNumber on the dev tools console?

MSFT-klpinhac commented 2 months ago

Here is the screenshot of the settings of the "pubDate" column:

Screenshot pubdate

The "Column Validation" is empty ( i have not included that into the screenshot, so that the screenshot is not oversized ) nothing special, i think

MSFT-klpinhac commented 2 months ago

_spModuleLink.buildNumber

image

i hope this helps!

arkogupta commented 2 months ago

@MSFT-klpinhac Is it possible for you to share a sample list with credentials? If not, could you create a new empty list from the existing list and share the csv file using "Export to csv with schema" ?

MSFT-klpinhac commented 2 months ago

i think i used this file to create the list, @arkogupta RSSExport_20240826.xlsx the data has been collected from a public german news rss-feed. Maybe you want to delete a few rows to stay below 5000 elements in the SharePoint List

arkogupta commented 2 months ago

@MSFT-klpinhac Thanks for sharing the excel. I am able to repro now. It only seems to occur when the groups are collapsed by default. Working on a fix rn.

arkogupta commented 2 months ago

@MSFT-klpinhac The fix ha been merged and should reach you in the week of 7th October.