17
Views
6
Comments
Solved
Month Picker

Hi, I'm using month picker and I want to save the month and year selected in 2 local variables (like SelectMonth and SelectYear). It's possible? Thanks :)

Solution

Hi 

First, you need to set the event handler to a new client action

Then inside the action, you can set the value of your local variable using the input variable of the event handler 


Thanks


Hi

You can set the values of your local variables in the OnSelected event handler on the MonthPicker widget. The OnSelected event handler has an input variable containing MonthOrder and year that you can use to set the values.

Thanks 

can you explain better please?

Solution

Hi 

First, you need to set the event handler to a new client action

Then inside the action, you can set the value of your local variable using the input variable of the event handler 


Thanks


Hey Inês ,

Follow this post.


https://www.outsystems.com/forums/discussion/91082/outsystems-ui-set-initialmonth-to-current-month-in-month-picker-component/



Is this similar to your question?

Thanks & Regards,

Sudip Pal

Hey  Inês , 

I understood your problem.

Please follow the below steps :

1)Create Selected_Month and Selected_Year local variable of type integer.

2)In MonthPickerOnSelect drag and drop assign and assign the year.But for Selected_Month use

If(SelectedMonth.Month=Entities.Month.January,1,

If(SelectedMonth.Month=Entities.Month.February,2,

If(SelectedMonth.Month=Entities.Month.March,3,

If(SelectedMonth.Month=Entities.Month.April,4,

If(SelectedMonth.Month=Entities.Month.May,5,

If(SelectedMonth.Month=Entities.Month.June,6,

If(SelectedMonth.Month=Entities.Month.July,7,

If(SelectedMonth.Month=Entities.Month.August,8,

If(SelectedMonth.Month=Entities.Month.September,9,

If(SelectedMonth.Month=Entities.Month.October,10,

If(SelectedMonth.Month=Entities.Month.November,11,12)))))))))))



It will definitely work!!!

Thanks & Regards,

Sudip Pal

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.