Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible date format for Kendo Grid and DatePicker #411

Closed
pajohns opened this issue Dec 6, 2019 · 1 comment
Closed

Incompatible date format for Kendo Grid and DatePicker #411

pajohns opened this issue Dec 6, 2019 · 1 comment

Comments

@pajohns
Copy link

pajohns commented Dec 6, 2019

I'm submitting a

  • Bug report

Current behavior

When entering a date format of {0:dd/MM/yyyy} for a ColumnData prop, when in edit mode a calendar picker shows the date format as US date of MM/dd/yyyy.

Expected behavior

The date should show as dd/MM/yyyy per the requested date format.

Minimal reproduction of the problem with instructions

  1. Create a Kendo grid with one column with following ColumnData:
const settlementDate: ColumnData = {
        field: 'settlementDate',
        title: 'Setlement Date',
        format: '{0:dd/MM/yyyy}',
        filterable: true,
        filter: 'date',
        editor: 'date'
    };
  1. Note that the date is displayed as MM/dd/yyyy
  2. Change the format to "dd/MM/yyyy"
  3. Note that when in view mode the date is displayed as "dd/MM/yyyy".

What is the motivation or use case for changing the behavior?

Currently I have to create a custom date cell for every instance of using a date field in my grid which is less than ideal.

Environment

Package versions:
@progress/kendo-data-query@1.5.2
@progress/kendo-dateinputs-react-wrapper@2019.4.1014
@progress/kendo-base-component-react-wrapper@2019.2.606
@progress/kendo-drawing@1.6.0
@progress/kendo-dropdowns-react-wrapper@2019.4.1014
@progress/kendo-base-component-react-wrapper@2019.2.606 deduped
@progress/kendo-react-data-tools@3.9.0
@progress/kendo-react-common@3.9.0
@progress/kendo-react-dateinputs@3.9.0
@progress/kendo-date-math@1.2.0
@progress/kendo-react-buttons@3.9.0
@progress/kendo-react-common@3.9.0
@progress/kendo-react-popup@3.9.0
@progress/kendo-react-dropdowns@3.9.0
@progress/kendo-react-common@3.9.0
@progress/kendo-react-popup@3.9.0
@progress/kendo-react-grid@3.9.0
@progress/kendo-react-common@3.9.0
@progress/kendo-react-inputs@3.9.0
@progress/kendo-react-common@3.9.0
@progress/kendo-react-popup@3.9.0
@progress/kendo-react-intl@3.9.0
@telerik/kendo-intl@1.5.2
@progress/kendo-react-pdf@3.9.0
@progress/kendo-file-saver@1.0.7
@progress/kendo-theme-default@4.7.0
@progress/kendo-theme-material@3.5.0
@progress/kendo-ui@2019.3.1113

Browser:

  • Chrome (desktop) version 78.0.3904.108

System:
Platform: Windows

Other information:
It appears that there is an incompatibility as to what a text display field requires as opposed to what a date picker requires. For text display it requires a format of '{0:dd/MM/yyyy}' whereas the datepicker requires a format of "dd/MM/yyyy".

@simonssspirit
Copy link
Contributor

I have provided an answer to the same question here. Please take a look at it:

https://feedback.telerik.com/kendo-react-ui/1445146-bug-in-react-grid-component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants