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

date.locale() returns undefined. Errors when using with antd DatePicker #43

Open
ashgkwd opened this issue Nov 29, 2018 · 0 comments
Open

Comments

@ashgkwd
Copy link

ashgkwd commented Nov 29, 2018

If moment-hijri object is passed to DatePicker from antd as value prop; then DatePicker errors because return of value.locale() is undefined

minimal codes to reproduce

import moment from "moment-hijri";
import { DatePicker } from "antd";

export default const HijriDatePicker = (props) => {
  return <DatePicker value={props.value} format="DD-MM-YYYY (iDD-iMM-iYYYY)" />
}

Here is CodeSandbox link to test it live.

ashgkwd added a commit to ashgkwd/moment-hijri that referenced this issue Nov 29, 2018
reloves antd DatePicker issue of undefined doesn't have function
utcOffset

ref xsoh#43
ashgkwd added a commit to ashgkwd/moment-hijri that referenced this issue Nov 29, 2018
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

1 participant