Skip to content

Magneto 2.3.4 - The Date of Birth should not be greater than today (JavaScript Calendar - DD/MM/YYYY) #27655

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

Closed
gilbertsohal opened this issue Apr 8, 2020 · 63 comments
Assignees
Labels
duplicate Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reported on 2.3.4 Indicates original Magento version for the Issue report.

Comments

@gilbertsohal
Copy link

Preconditions (*)

  1. Magento version 2.3.4
  2. Australia locale in admin
  3. PHP ver 7.1
  4. CLOUDLINUX 6.10

Steps to reproduce (*)

  1. Use JavaScript Calendar (Yes)
  2. Date Fields Order (DD/MM/YYYY)
  3. Screenshot - https://prnt.sc/rvdcgj
  4. Customer > Edit Customer > Account Information > Date of Birth

Expected result (*)

  1. Save Customer Any Date of Birth without error

Actual result (*)

  1. Showing error on save (The Date of Birth should not be greater than today.)
  2. Screenshot - https://prnt.sc/rvdd2u
@m2-assistant
Copy link

m2-assistant bot commented Apr 8, 2020

Hi @gilbertsohal. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@gilbertsohal do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Apr 8, 2020
@sudheers-kensium sudheers-kensium self-assigned this Apr 8, 2020
@m2-assistant
Copy link

m2-assistant bot commented Apr 8, 2020

Hi @sudheers-kensium. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@sudheers-kensium
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @sudheers-kensium. Thank you for your request. I'm working on Magento 2.4-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @sudheers-kensium, here is your Magento instance.
Admin access: https://i-27655-2-4-develop.instances.magento-community.engineering/admin_5375
Login: f6b6eb25 Password: 35ac5f6aef56
Instance will be terminated in up to 3 hours.

@sudheers-kensium
Copy link
Contributor

@gilbertsohal Use JavaScript Calendar setting for to enable or disable the JavaScript Calendar in product custom option, not for the time format in customer edit.

Please check below link
https://docs.magento.com/m2/ce/user_guide/stores/attribute-date-time-options.html

image

@sudheers-kensium
Copy link
Contributor

This is not an issue, so I am closing this.

@gilbertsohal
Copy link
Author

Hi

This is not an issue, so I am closing this.

Why this issue happening with my fresh Installation can you investigate
Showing error on save (The Date of Birth should not be greater than today.)
Screenshot - https://prnt.sc/rvdd2u

@sudheers-kensium
Copy link
Contributor

@gilbertsohal Please use calendar to choose the date. You are entering wrong format.

@gilbertsohal
Copy link
Author

@gilbertsohal Please use calendar to choose the date. You are entering wrong format.

Sorry about miss understanding forgot about the calendar.

Please check the Date of Birth error. I installed fresh magneto 2.3.4 and getting below error.

Customer > Edit Customer > Account Information > Date of Birth

Screenshot
https://prnt.sc/rvdd2u

Could you please help me.

@sudheers-kensium
Copy link
Contributor

@gilbertsohal Click on calendar icon and select the date.

@gilbertsohal
Copy link
Author

@gilbertsohal Click on calendar icon and select the date.

Yes i m doing same click on calendar icon and selecting date but i m getting error if i select MM/DD/YYYY then its working fine but i need DD/MM/YYYY

Screenshot (MM/DD/YYYY)
https://prnt.sc/rvgavu

Screenshot 1 (DD/MM/YYYY)
https://prnt.sc/rvgcgt

Same thing happening with product Set as new

Screenshot 1
https://prnt.sc/rvd3o8

Screenshot 2
https://prnt.sc/rvd42u

@sudheers-kensium
Copy link
Contributor

@gilbertsohal To change visible date format in date inputs You need to set proper Interface Locale in the Account Setting. Please follow below steps and save the configuration.

image

@gilbertsohal
Copy link
Author

@gilbertsohal To change visible date format in date inputs You need to set proper Interface Locale in the Account Setting. Please follow below steps and save the configuration.

image

I have setup everything Please check screenshot.
https://prnt.sc/rvh37p

@sudheers-kensium
Copy link
Contributor

@gilbertsohal This is working in Magento 2.4-develop instance

@gilbertsohal
Copy link
Author

@gilbertsohal This is working in Magento 2.4-develop instance

But its not working on my Magento version 2.3.4. Is this possibility i have new VPS server and newly account created in WHM is this possibility to miss any php extension or configuration.

@jkg1996
Copy link

jkg1996 commented Apr 23, 2020

So what was the issue then for showing "The Date of Birth should not be greater than today." I have the same issue now. I am using 2.3.4 and why did you close it when the issue wasn't fixed

@gilbertsohal
Copy link
Author

gilbertsohal commented Apr 23, 2020

So what was the issue then for showing "The Date of Birth should not be greater than today." I have the same issue now. I am using 2.3.4 and why did you close it when the issue wasn't fixed

Yes this issue still present in 2.3.4 nobody want to fix it...lol

@gilbertsohal
Copy link
Author

Screenshot (MM/DD/YYYY)
https://prnt.sc/rvgavu

Screenshot 1 (DD/MM/YYYY)
https://prnt.sc/rvgcgt

Same thing happening with product Set as new

Screenshot 1
https://prnt.sc/rvd3o8

Screenshot 2
https://prnt.sc/rvd42u

@jkg1996
Copy link

jkg1996 commented Apr 23, 2020

I have the same issue exact same issue I am not sure why this is happening like its unreal.

@Gabibelt
Copy link

hello, i have same problem in register customer "The Date of Birth should not be greater than today." u can solved this problem?

@ssniranga
Copy link

ssniranga commented May 25, 2020

I am having the same issue on Register form Magento 2.3.4. any fix for this?

@DanielRuf
Copy link
Contributor

@ssniranga
Copy link

#27655 (comment)
#27655 (comment)

I added above to the JS file but still getting the issue mate

@DanielRuf
Copy link
Contributor

I added above to the JS file but still getting the issue mate

Did you recompile everything?

#27655 (comment)

@ssniranga
Copy link

I added above to the JS file but still getting the issue mate

Did you recompile everything?

#27655 (comment)

Yes. Did everything

@jkg1996
Copy link

jkg1996 commented May 27, 2020

@ssniranga how you editing the core or patch?

@jkg1996
Copy link

jkg1996 commented May 27, 2020

this fix worked for me I am not getting that error now. try to change the core first see if that works then create a patch.
The core file is located ->magento\module-ui\view\base\web\js\lib\validation\rules.js line 1071

@Gabibelt
Copy link

fix for me, in cloudflare clear cache clear all cache and found fine.

@ncompass
Copy link

Experiencing the same issue here on Magento 2.3.4-p2 on the customer registration page.

Above fixes only work for the admin area.

@ncompass
Copy link

en_GB locale DD/MM/YYYY

@ncompass
Copy link

A better fix for magento\module-ui\view\base\web\js\lib\validation\rules.js is found here...

#27027
8f81132

Still trying to find a fix for vendor/magento/module-customer/view/frontend/web/js/validation.js for the frontend...

@ncompass
Copy link

Ok so I've fixed the front end/registration page..

@ssniranga - I can see you had the same issue.

"vendor/magento/module-customer/view/frontend/web/js/validation.js"
change the below line..
return moment(value).isBefore(moment());
to
return moment(value, ["YOUR DATE FORMAT HERE"]).isBefore(moment());

For us (enGB / UK format):-
return moment(value, ["DD.MM.YYYY"]).isBefore(moment());

Your welcome.

@ssniranga
Copy link

@ncompass Legend. I added the fixed and it seems working now. :).

Thank you very much Guys.

@chandu-pinpoint
Copy link

This issue still exists on magento 2.3.5-p1

@swathishs swathishs self-assigned this Jun 4, 2020
@m2-assistant
Copy link

m2-assistant bot commented Jun 4, 2020

Hi @swathishs. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@swathishs
Copy link

@chandu-pinpoint : Tested the issue in 2.3.5 p1 the issue is not reproducible

  1. Date format.
    image

  2. Date of birth:
    E2E5R5Bpox

  3. Can Set Product as New From for the product:
    wUvOBcHj2q

Note: This issue was reported by the reporter. Could you please let me know this issue is what your saying or any other issue is there. please let me know

@chandu-pinpoint
Copy link

chandu-pinpoint commented Jun 4, 2020

@swathishs The issue is during Create customer account on frontend.

@swathishs
Copy link

@chandu-pinpoint : Thank you for your report.
Seems a similar issue is already been in ready for dev.
Please check - #28482

Hence closing the issue

@jhonathan93
Copy link

@ncompass thank you my friend

@magento-engcom-team magento-engcom-team added the Reported on 2.3.4 Indicates original Magento version for the Issue report. label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Reported on 2.3.4 Indicates original Magento version for the Issue report.
Projects
None yet
Development

No branches or pull requests