You need then to have a Date variable as an input of your action, let's call it DateInput in this example.
Your BeginDate should be:
AddMonths(NewDate(Year(DateInput), Month(DateInput), 1),-1)
Your EndDate should be:
AddDays(NewDate(Year(DateInput), Month(DateInput), 1), -1)
Cheers,
João