This is a migrated thread and some comments may be shown as answers.

Adding Date and days in another date filed

2 Answers 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mohamed
Top achievements
Rank 1
mohamed asked on 24 Sep 2011, 02:33 PM

Hello every one

I want add datefield and days ex(01/01/2011)+5 = output come like 06/01/2011 in one raddatepicker ,
after press days filed calculation added come raddatepicker,
Through javascript...

Thanks,
Mohamed.

2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 24 Sep 2011, 04:12 PM
Hello Mohamed,

i got your point but i want more clarification.By which procedure you want new date.

Thanks,
Jayesh Goyani
0
mohamed
Top achievements
Rank 1
answered on 25 Sep 2011, 05:06 AM
Thanks for ur replay Jayesh Goyani ,
Problem Resolved,

function changeEndDate(startDateID, Duration, endDateID) {               
                var startDateObj = $find(startDateID);
                var durat = $find(Duration).get_value();
                var endDateObj = $find(endDateID);
                var newMinDate = startDateObj.get_selectedDate();
                var findur = durat - 1;
                var date = new Date();
                date.setDate(newMinDate.getDate() + findur);
                endDateObj.set_selectedDate(date);
            }



Thanks,
Mohamed.
Tags
Grid
Asked by
mohamed
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
mohamed
Top achievements
Rank 1
Share this question
or