Locale prop no longer working
See original GitHub issueIssue Description
The prop locale
doesn’t seem to work anymore for the time separators in the chat.
Steps to Reproduce / Code Snippets
You find it here: https://snack.expo.io/SJD3c-swG
import React, { Component } from 'react';
import { View } from 'react-native';
import { GiftedChat } from 'react-native-gifted-chat' // 0.3.0
export default class App extends Component {
render() {
const userId= '123';
const messages = [{
_id: '1',
createdAt: 1519225196922,
text: 'Hello',
user: {
_id: userId,
name: "Name",
},
}]
return (
<View style={{flex:1}}>
<GiftedChat
messages={messages}
user={{ _id: userId }}
dateFormat={'dddd DD. MMMM'}
locale={'nb'}
/>
</View>
);
}
}
Expected Results
That the time separator should be in norwegian (according to locale prop)
Additional Information
- Nodejs version: 7.5.0
- React version: 16.2.0
- React Native version: 0.52
- react-native-gifted-chat version: 0.3.0
- Platform(s) (iOS, Android, or both?): At least on iOS (haven’t tested android)
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Locale prop not working after update to version 1.0.4 #2293
Issue Description After an update to the version 1.0.4 from 0.16.3 the locale prop of the GiftedChat component doesn't seem to work anymore....
Read more >React - setting local state with props not working
I am trying to set the local state from a prop, like this: constructor() { super(); this.toggleDetails = this.toggleDetails.bind(this); this ...
Read more >DLGF: Personal Property - IN.gov
Inventory is no longer taxed. Licensed motor vehicles, trailers, motorized boats, most airplanes, campers, recreational vehicles, and other registered ...
Read more >Context - React
Context provides a way to pass data through the component tree without having to pass props down manually at every level. In a...
Read more >TAX CODE CHAPTER 25. LOCAL APPRAISAL
A contract for private appraisal services is void if the amount of compensation to be paid the private appraisal firm is contingent on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Having the same issue. But it’s working if you import this
#1397 we will use
dayjs
instead