Skip to content

Commit

Permalink
Update Index.cshtml
Browse files Browse the repository at this point in the history
  • Loading branch information
16adianay committed Mar 18, 2024
1 parent 807b53c commit 96d8537
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ASP.NET Core/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@


<script>
function parser(value) {
const parseSelectBox = $('#parse-behavior').dxSelectBox('instance');
const algorithm = parseSelectBox.option('value');
function parser(value, algorithm) {
const resultDate = new Date(value);
if (algorithm === 'javascript') { return resultDate; }
Expand Down Expand Up @@ -88,7 +85,7 @@
const formatter = (value) => value.toLocaleDateString();
const displayFormat = {
parser: (val) => parser(val),
parser: (val) => parser(val, $('#parse-behavior').dxSelectBox('instance').option("value")),
formatter: (val) => formatter(val),
};
</script>

0 comments on commit 96d8537

Please sign in to comment.