Date Format and localization (en-GB)
Hi,
Where can I set the uiCulture to UK as I'm having problems using this date format "dd/mm/yyyy". I Get Invalid data when i pass the date format in en-GB
Kind Regards, Zak
Documentation
Please check the official documentation before asking questions: https://docs.abp.io
GitHub Issues
GitHub issues are for bug reports, feature requests and other discussions about the framework.
If you're creating a bug/problem report, please include followings:
- Your ABP Framework version.
- Your User Interface type (Angular/MVC/React... etc.) if the issue is related to a specific UI
- Exception message and stack trace if available (check the logs).
- Steps needed to reproduce the problem.
Please write in English.
Stack Overflow
Please use Stack Overflow for your questions about using the framework, templates and samples:
https://stackoverflow.com/questions/tagged/abp
Use abp tag in your questions.
Please provide the necessary information for the issue.
GitHub Issues
GitHub issues are for bug reports, feature requests and other discussions about the framework.
If you're creating a bug/problem report, please include followings:
- Your ABP Framework version.
- Your User Interface type (Angular/MVC/React... etc.) if the issue is related to a specific UI
- Exception message and stack trace if available (check the logs).
- Steps needed to reproduce the problem.
Hi, Thanks for your support.
I'm currently using Version 2.9 with MVC
as mentioned earlier it doesn't accept british date format dd/mm/yyyy. I get an Invalid date but if I change it to US Date Format (mm/dd/yyyy) then it passes
I need to change the localization to (en-GB) and UK Date format.
Cheers
Zak
Hi @zaktecs,
You can set language parameter of your datepicker object with abp.localization.currentCulture.cultureName
Example:
<abp-input asp-for="MyDate" type="text" class="datepicker" />
and my js file
$('input.datepicker').datepicker({
todayBtn: "linked",
autoclose: true,
language: abp.localization.currentCulture.cultureName
}).on('hide', function (e) { e.stopPropagation(); });
My results:
TR

EN

PT

All types are working with backend with no problem.
@cotur , many thanks for your help.
Zak