Hi everybody
When i'm trying to change the End date of the recurrence info object, the CalculateDays function returns the StartDate as the EndDate for some reason. Is there something i'm doing wrong?
I change the RecurrenceCounter to -1 and the RecurrenceEndType to 2, and then running the CalculateDays function.
Please have a look at the object before:
{
"Pattern": 2,
"RecurrenceCounter": -1,
"RecurrenceEndType": 2,
"RecurrenceId": 3320,
"IsRecurrence": true,
"EndDate": "2021-08-03 16:30:00",
"StartDate": "2020-08-04 00:00:00",
"dayPattern": {
"Cycle": 1,
"Pattern": 3
},
"monthPattern": {
"Cycle": 1,
"Day": 1,
"Weekday": 2,
"Pattern": 4,
"WeekOfMonth": 1
},
"weekPattern": {
"Cycle": 1,
"Weekday": 2
},
"yearPattern": {
"Cycle": 12,
"Day": 1,
"Weekday": 2,
"Pattern": 6,
"WeekOfMonth": 1
},
"recurrenceDate": [
{
"IsConflict": false,
"Date": "2020-12-01 00:00:00",
"Description": "",
"DescriptionStyleHint": "",
"Tooltip": ""
},.....
]
}
And the returned object after running CalculateDays:
{
"Pattern": 2,
"RecurrenceCounter": 1,
"RecurrenceEndType": 2,
"RecurrenceId": 3320,
"IsRecurrence": true,
"EndDate": "2020-08-04 00:00:00",
"StartDate": "2020-08-04 00:00:00",
"dayPattern": {
"Cycle": 1,
"Pattern": 3
},
"monthPattern": {
"Cycle": 1,
"Day": 1,
"Weekday": 2,
"Pattern": 4,
"WeekOfMonth": 1
},
"weekPattern": {
"Cycle": 1,
"Weekday": 2
},
"yearPattern": {
"Cycle": 12,
"Day": 1,
"Weekday": 2,
"Pattern": 6,
"WeekOfMonth": 1
},
"recurrenceDate": [
{
"IsConflict": false,
"Date": "2020-08-04 00:00:00",
"Description": "",
"DescriptionStyleHint": "",
"Tooltip": ""
}
]
}
As you can see, EndDate and StartDate are suddenly equal?
So the question is, how do i change from RecurrenceEndType 1 to 2 (Using end time instead of counter) - using EndType 1 works perfectly.
thanks