"736C677C4" Boostrap3 DateTimePicker use Chinese newspaper locale ZH-CN is not loaded from moment locales! exception resolution

Source: Internet
Author: User
Tags locale

This exception was reported because the moment library was not introduced or the multilingual Support library for moment was not introduced.

BOOSTRAP3 the corresponding datetimepicker4.17.37 control, which relies on the Moment.js date library when using a language pack, you must introduce the moment library of the multi-language support version in http://momentjs.cn/. and must be placed before the introduction of DateTimePicker. and then use

$ (' #newDate '). DateTimePicker ({
                locale: ' ZH-CN ',
                format: "Yyyy-mm-dd HH:mm:ss"
		    

method to set the language.


Most of all, I've used a framework that has packaged various plug-ins including jquery libraries into a file vendor.js, and then this vendor actually contains the Moment.js library, and it's a library with no language packs ... So no matter how I introduce moment-with-locales.js in the perimeter <script> tag, this library doesn't work ... 囧 Finally, replace the moment portion of the compressed file with Moment-with-locales. It was finally resolved.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.