Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
sharifzadesina committed Sep 12, 2020
1 parent 0364d2f commit 2d376e1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"prefer-stable": true,
"require": {
"php": "^7.2",
"laravel/framework": "^6.0|^7.0|^8.0"
"laravel/framework": "^6.0|^7.0|^8.0",
"laravel/ui": "^1.0|^2.0|^3.0"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 9 additions & 1 deletion public/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ $.extend(true, $.fn.dataTable.defaults, {
"<'row'<'col-sm-5'i><'col-sm-7'p>>"
});

$.fn.dataTable.render.intlDateTime = function (options, locale) {
const defaultOptions = { dateStyle: "medium", timeStyle: "medium" };
const defaultLocale = document.documentElement.lang;
return function (data) {
return new Intl.DateTimeFormat(locale ?? defaultLocale, { ...defaultOptions, ...options }).format(new Date(data));
};
};

/* Sidebar Menu State */

$('.sidebar-menu a').each(function () {
Expand All @@ -30,7 +38,7 @@ $('.sidebar-menu li.treeview > a').each(function () {
}
});

/* Select field autovalue */
/* Select Field Auto Value */

$('select[value]').each(function () {
$(this).find(`option[value="${$(this).attr('value')}"]`).prop('selected', true);
Expand Down

0 comments on commit 2d376e1

Please sign in to comment.