1.1.6
macOS/Chrome 53
2.0.1
https://jsfiddle.net/rchcj33o/
Set up the datepicker as described & set the locale to en-GB.
I've set my locale as follows:
import elementLocale from 'element-ui/lib/locale/lang/en';
Vue.use(ElementUI, { elementLocale });
I've not managed to update the webpack as requested because of an issue with a separate library
{
plugins: [
new webpack.NormalModuleReplacementPlugin(/element-ui[\/\\]lib[\/\\]locale[\/\\]lang[\/\\]zh-CN/, 'element-ui/lib/locale/lang/en')
]
}
I'm not sure if this should fix my issue but even if it did, I've set the locale as en-GB
Locale is in English
The locale is in zn-CH
import elementLocale from 'element-ui/lib/locale/lang/en';
Vue.use(ElementUI, { locale: elementLocale });
{ elementLocale } will be compile to { elementLocale: elementLocale }
Stupidity on my end, sorry
and thanks @QingWei-Li
Hi, when i use ONLY datepicker,
npm i element-datepicker -S
import ElDatePicker from 'element-datepicker'
Vue.use(ElDatePicker)
How can i translate? if i try elementLocale it doesnt work, someone can help me?
@rodolfosaraiva
(Element as any).locale(locale);
(Element as any).size(Cookies.get('size') || 'medium');
or in JS Pure
Element.locale(locale);
Element.size(Cookies.get('size') || 'medium');
Most helpful comment
{ elementLocale }will be compile to{ elementLocale: elementLocale }