How to pre-select row in repeater on Page Load

Hi there,

I have made a Calendar Date Picker using a repeater (file attached), but I would like the calendar to show a selected date on the page load, instead of letting the user select a date first.

I’ve tried to target the row in the repeater, and I’ve tried to add an if statement to add True for the 10th row in the repeater but neither work and I’m really puzzled.

I can get checkboxes to pre-select in repeaters on page load but I can’t get a single date in the repeater to be selected on page load.

Any help would be very much appreciated. Thank you.

Calendar Date Picker.rp (96.9 KB)

If you’re just trying to target a single row of a repeater externally, you can use a repeater trick that takes advantage of an event listener. For an explanation of this, you can also refer to the forum post linked below:

I have also made these changes in your project file and attached it here. Calendar Date Picker - Axure Edit.rp (102.3 KB)

To briefly explain, I added the “Move by 0,0” action under the “Page Loaded”. I needed to include the “Wait” action just before to ensure proper firing sequence of the next action.

image

Then, on the dynamic panel I have the “Moved” event follow by the condition and action I need.

image

There are also a few things about your project that I was curious about. On this “Calendar” repeater there are a few “Set Text” interactions that are redundant. Because these widgets are connected via the repeater dataset feature, you won’t need to manually connect them using interaction.

On the dynamic panel, the “Edit Row Data” action is trying to edit a column that doesn’t exist. However, the byproduct of this action is that it resets the repeater and therefore erases the previous calendar selection. This seems to be a desired effect but just wanted to shed some light on this.

Thanks Ben, thats great!

You are right about the Set Text interactions, I created this calendar from an old tutorial where they were required.

I think the other Edit Row Data is required as you say.

Many thanks for your insight.