-3

Team, I have requirement in my project i need to select date from calendar control and will ensure that it should not be future date it should be current date or lesser to it. Expression is as shown below. ORG_IND_EFF_FROM_DATE <= new Date() Issue: When i am selecting today's date(22/11/2021) from application it will assign to ORG_IND_EFF_FROM_DATE and will do comparison with new Date() but new date function returns in server 21/11/2021. till 10 am IST date will not change so it is saying future date you are selected so date is not valid though i selected current date . After 10 Am IST server date will change to 12 Am date will become 22/11/2021 till this application behaving wrongly, Could you please assist in this regards either in Java script or C#.Net

1 Answers1

0

You can find you answer here Another option

This is a timezone issue it looks like. New Date() is pulling a different timezone. Your options are to change your ORG_IND_EFF_FROM_DATE to the new Date(), or new Date() to your ORG_IND_EFF_FROM_DATE timezone.

kipras
  • 71
  • 3