Skip to content

Commit

Permalink
fix the birthday input validation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
xjlin0 committed Jan 14, 2025
1 parent b2acba8 commit b52117f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions attendees/static/js/persons/attendee_update_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -1330,12 +1330,12 @@ Attendees.datagridUpdate = {
validationRules: [
{
type: 'range',
max: new Date(),
max: new Date().toLocaleDateString('sv-SE'),
message: "Birthday can't be future",
},
{
type: 'range',
min: new Date().setFullYear(1799),
min: new Date(new Date().setFullYear(1799)).toLocaleDateString('sv-SE'),
message: "Birthday year should be 4 digit, like 1980 instead of 2 digit 80",
},
],
Expand Down
4 changes: 2 additions & 2 deletions attendees/templates/persons/attendee_update_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
{% block extra_head %}
<script defer
type="text/javascript"
src="https://cdn3.devexpress.com/jslib/21.2.11/js/dx.web.js"
integrity="sha384-209QJH8lCoDrB70trdPkGFr84168dIgFO2IYDKFYUv73DqCa161cBayeTRYdzjSp"
src="https://cdn3.devexpress.com/jslib/21.2.15/js/dx.web.js"
integrity="sha384-n0Qg+GKEj2b5PQ3GBb4eu8nef1Rvhjl7+Ry4ypKQ/ASzAgtqt4dDrM1yFB5HlSAn"
crossorigin="anonymous">
</script>

Expand Down

0 comments on commit b52117f

Please sign in to comment.