# \[Resolved\] How to set default value on ion-select

**URL:** <https://forum.ionicframework.com/t/resolved-how-to-set-default-value-on-ion-select/103440>\
**Category:** ionic-v3\
**Created:** [August 28, 2017, 12:02pm UTC](https://forum.ionicframework.com/t/resolved-how-to-set-default-value-on-ion-select/103440 "2017-08-28T12:02:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlim](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@dlim](https://forum.ionicframework.com/u/dlim)\
**Post date:** [August 28, 2017, 12:02pm UTC](https://forum.ionicframework.com/t/resolved-how-to-set-default-value-on-ion-select/103440/1 "2017-08-28T12:02:06Z")

</div>

I would like to set a default value to Option Button on initial load.

Here’s is my code but nothing is selected when page load.

HTML file:

```auto
    <ion-item>
      <ion-label>Date</ion-label>
      <ion-select [(ngModel)]="selected_month">
        <ion-option *ngFor="let m of months" value="{{m}}" [selected]="selected_month == m">{{ m }}</ion-option>
      </ion-select>
      <ion-select [(ngModel)]="selected_year">
        <ion-option *ngFor="let y of years" value="{{y}}" [selected]="selected_year == y">{{ y }}</ion-option>
      </ion-select>
    </ion-item>

```

TS file:

```auto
  selected_month: any;
  selected_year: any;

  months: string[] = ['2015', '2016', '2017'];
  years: string[] = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];

constructor()
{
    this.selected_month = 'Aug';
    this.selected_year = '2017';
}

```

Tried using both selected property and setting the value on TS file without luck.

Did I miss a step?

---

<div class="post-metadata">

**Author:** ![dlim](https://avatars.discourse-cdn.com/v4/letter/d/54ee81/32.png) [@dlim](https://forum.ionicframework.com/u/dlim)\
**Post date:** [August 28, 2017, 12:32pm UTC](https://forum.ionicframework.com/t/resolved-how-to-set-default-value-on-ion-select/103440/2 "2017-08-28T12:32:02Z")

</div>

Found the issue. My bad, I had interchanged month and year values 😃
