0

I have created the Sharepoint List with JSON for conditional formatting. The regional Setting for locale is "English- United States" due to which my current Date format is MM/DD/YYYY. Regional Setting

I have added one JSON in list which will compare input date with due date. JSON is working in current scenario.

After Adding JSON

but i when i try to change the regional setting to "English-India". Some date fields show "Invalid Date" and some are working.

JSON after changing the regional Setting

So please help me to solve this issue. and also i dont want Date and Time format in fields. We only require Date in DD/MM/YYYY format without affecting JSON function.

  • 1
    first thing first, For security reasons, I would suggest you to attach different screen shots which do not expose your sharepoint site and tenant. – DvG Jul 10 '18 at 6:39
  • Can you share you JSON? That way we can help you more. – Imir Hoxha Jul 10 '18 at 7:41
  • { "$schema": "columnformatting.sharepointpnp.com/columnFormattingSchema.json", "debugMode": true, "elmType": "div", "txtContent": "[$Inspection_x0020_Call_x0020_Rais]", "style": { "background-color": { "operator": "?", "operands": [ { "operator": "<=", "operands": [ "[$Planned_x0020_Date_x0020__x002d_]", "[$Inspection_x0020_Call_x0020_Rais]" ] }, "#E18D85", "" ] } } } – Kunal Rane Jul 10 '18 at 9:24
  • this is JSON that i was using previously. – Kunal Rane Jul 10 '18 at 9:25
  • Any update on this. – Kunal Rane Jul 19 '18 at 10:55
0

Check this out -> https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting

{
   "elmType": "div",
   "txtContent": "@currentField",
   "style": {
      "color": {
         "operator": "?",
         "operands": [
            {
               "operator": "<=",
               "operands": [
                  "[$DueDate]",
                  {
                     "operator": "Date()",
                     "operands": [
                        "3/22/2017"
                     ]
                  }
               ]
            },
            "#ff0000",
            ""
         ]
      }
   }
}

In your Case, it should be DD/MM/YYYY.

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.