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

Add option to override the defaultDateFormat. #18298

Closed
maliming opened this issue Nov 29, 2023 · 0 comments
Closed

Add option to override the defaultDateFormat. #18298

maliming opened this issue Nov 29, 2023 · 0 comments
Assignees
Milestone

Comments

@maliming
Copy link
Member

maliming commented Nov 29, 2023

Developers should be able to customize the date format.
We can use the default date format from abp.localization.currentCulture.dateTimeFormat

var dateFormat = options.dateFormat;
var separator = options.separator;
var defaultDateFormat = extendDateFormat("YYYY-MM-DD", options);

https://uxsolutions.github.io/bootstrap-datepicker/?markup=range&format=yyyy-mm-dd&weekStart=&startDate=&endDate=&startView=0&minViewMode=0&maxViewMode=4&todayBtn=false&clearBtn=false&language=en&orientation=auto&multidate=&multidateSeparator=&keyboardNavigation=on&forceParse=on#sandbox

https://bootstrap-datepicker.readthedocs.io/en/latest/options.html#format

{
    "calendarAlgorithmType": "SolarCalendar",
    "dateTimeFormatLong": "dddd, MMMM d, yyyy",
    "shortDatePattern": "M/d/yyyy",
    "fullDateTimePattern": "dddd, MMMM d, yyyy h:mm:ss tt",
    "dateSeparator": "/",
    "shortTimePattern": "h:mm tt",
    "longTimePattern": "h:mm:ss tt"
}
@maliming maliming self-assigned this Nov 29, 2023
@maliming maliming added this to the 8.1-preview milestone Nov 29, 2023
@maliming maliming assigned salihozkara and unassigned maliming Nov 30, 2023
@maliming maliming closed this as completed Jan 2, 2024
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

2 participants