Skip to main content

Hi all,

 

I have a issue with the calander control in smartforms, just wondering if anyone has had the same issue and if there is a workaround for it. So the problem is is:

 

I have a k2 server which has one timezone of GMT. I have forms that are used across europe. Now the issue is that  a user in germany for example selects 24-04-2015. Lets say Germany is GMT +1 and the server is GMT. Now for some reason, the calender control tries to compensate for the GMT time difference and subtracts an hour. Since the calender control only selects the date and defaults the time to 00:00:00 HH:MM:SS. This means that the calender control will return a value of 23-04-2015 because 24-04-2015 00:00:00 minus one hour is 23-04-2015 23:00:00.

 

I have tried to change the control to take time as well, so that i can workout but if you make the calender control take time, it requires another action from the user to select the time. This would not be intuitive. Does anyone else have this issue?

 

Thanks

 

 

Dear,

 

Maybe if you create an expression to add hours to your calendar would solve the issue

 

for example:

 

AddHours( calendar, 1) 

 

 


Thanks for your reply.

 

That could also work but that is going to get messy with the american users beacause i assume that the contol would compensate and subtract in that case. 

Would be great to hear some more suggestion or ideas.

 

 


Dear,

 

If you don't have too many countries in the scope AND somehow you can get the current user country, just create a list (lookup) has each country and it's GMT 

 

for example : 

 

               Country                    GMT

 

1            Germany                  1

2            Jordan                      3

 

now according to the current user country use the addHours expression and give it the GMT of the country to be added as hours 


Unfortunately, the country list is quite big and I would need to get the country (timezone information though). Your method would work that way but I would prefer to not have this dependency if possible. 

 

Just need to find a way to make the calender control return the exact date selected and not make it do any sort of transformation. Not sure why this was a good idea to implement something like this. I would understand in the case of if the calender control has a time picker,  but for a simple calender control that just selects date , this feature does not make sense.


Reply