Hi there, I've created a form with a date field (Reporting End Date) which is tied to a custom entity. I want that value to default to the last day of the current month. I can't figure out how to accomplish this using the business rules or by creating a calculated value field. Can someone please help?
Thanks in advance!
Hi,
Please mark my answer as verified if that helped you. Thanks XD
Thanks for the help!
Hi,
use below options, i don't think business rule is able to achieve that.
Javascript
- var lastDay = new Date(date.getFullYear(), date.getMonth() + 1, 0);
[View:https://www.tutorialspoint.com/How-to-get-first-and-last-date-of-the-current-month-with-JavaScript:750:50]
C#
stackoverflow.com/.../getting-first-and-last-day-of-the-current-month
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,902 Super User 2024 Season 2
Martin Dráb 229,297 Most Valuable Professional
nmaenpaa 101,156