I want to calculate end date depending on the dropdown list and start date. I use Koala Framework 3.8 (ExtJS 2.3 and Zend 1.12).
If I choose '3' from dropdown and start date is 07.07.2015:
Then end date value becomes 07.08.2015 (+1 month, depending on DB field of '3' value):
I need something that listens to the change event on the combobox/datefield and sets the date dynamically (depending on DB month of combobox with ajax request or another way).
In steps:
- I set combobox value in form and set start date
- If 1st step complete values not null select month value from DB (
SELECT month from approaches where approachesCount=3 AND ...
) - Add selected month value from step 2 to start date
- Put 3rd step date to datefield. I can change this date if needed.
How to do this?
Finally I did it in this way, maybe it can be done better: