mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

WIP: add AdapterDateFnsJalaliV3

Open smmoosavi opened this issue 1 year ago • 1 comments

AdapterDateFnsJalaliV3

I am trying to add AdapterDateFnsJalaliV3 to x-date-pickers

but I have a problem with the Babel config to replace date-fns-jalali with date-fns-jalali-v3. can anyone help to fix the problem?

// in AdapterDateFnsJalaliV3.ts
console.log(module.children.map(f => f.filename))
[
  '/.../mui-x/node_modules/date-fns-jalali/addSeconds/index.js',
  '/.../mui-x/node_modules/date-fns-jalali/addMinutes/index.js',
  '/.../mui-x/node_modules/date-fns-jalali/addHours/index.js',
  '/.../mui-x/node_modules/date-fns-jalali/addDays/index.js',
  // ...
]

smmoosavi avatar Apr 24 '24 08:04 smmoosavi

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Apr 24 '24 15:04 github-actions[bot]

I found the problem with the Babel config. the patches/[email protected] patch had hard-coded AdapterDateFnsV3.ts

- _ref2.filename.includes('AdapterDateFnsV3.ts')
+ _ref2.filename.includes(_ref2.opts.filenameIncludes || '')

smmoosavi avatar May 07 '24 03:05 smmoosavi

I hope this pull request is ready for review. I tried to have well-separated commits, especially separated copy and rename commits will help in the review process

@LukasTy

smmoosavi avatar May 07 '24 03:05 smmoosavi

Deploy preview: https://deploy-preview-12891--material-ui-x.netlify.app/

Updated pages:

Generated by :no_entry_sign: dangerJS against 4a68033a50d40915aef8e021a809e72ed03eab24

mui-bot avatar May 08 '24 13:05 mui-bot

Thanks.

P.S. This adapter will be released with the next v7 release. If there are enough requests, we can back-port it to v6. 😉 Does that make sense? 🤔

yes.

smmoosavi avatar May 08 '24 15:05 smmoosavi