> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Method name: enabledDateRanges()

# Method package: w

# Method menu location: w --> MobileDatePicker --> enabledDateRanges

# Method Link: https://dev.wix.com/docs/velo/velo-only-apis/$w/mobile-date-picker/enabled-date-ranges.md

# Method Description:

Sets or gets ranges of dates that an app user can select.

Setting `enabledDateRanges` lets app users
 select dates in the specified ranges, provided that the dates aren't 
 disabled by some other property. 
  
> **Note:** All dates outside the set ranges are disabled.

 Set `enabledDateRanges` to:
 + An array of date ranges to enable, each with a start date and an end date.
 + An empty array (`[]`), to disable all dates.
 +`null`, to ignore `enabledDateRanges`. Use this to ignore previously set enabled date ranges.

 Getting `enabledDateRanges` returns the current
 list of enabled date ranges.

 Ranges are inclusive. This means that January 10th and February 10th are enabled 
 when specifying a range from January 10, 2025 to February 10, 2025. 


 Disabled dates override any dates enabled with `enabledDateRanges`.
 This includes dates disabled in the editor and with the following properties: 
 + `disabledDateRanges`
 + `disabledDaysOfWeek`
 + `minDate`
 + `maxDate`

 This means that if a date matches both enabled and disabled properties, the app user 
 can't select the date in the date picker.



# Method Code Examples:

*** Note: do not assume any prop names or enum values other than the ones in the example.

## Get ranges of dates that are enabled

```javascript
let enabledDates = $w('#myMobileDatePicker').enabledDateRanges;

let firstEnabledStartDateAsString = enabledDates[0].startDate.toDateString(); // 'Sat Dec 25 2022'
```

## Set ranges of dates that are enabled

```javascript
const monthsOnCall = [
  {
    startDate: new Date('1/1/2022'),
    endDate: new Date('1/31/2022')
  },
  {
    startDate: new Date('4/01/2022'),
    endDate: new Date('4/30/2022')
  },
  {
    startDate: new Date('7/01/2022'),
    endDate: new Date('7/31/2022')
  },
  {
    startDate: new Date('10/01/2022'),
    endDate: new Date('10/31/2022')
  }
];
$w('#myMobileDatePicker').enabledDateRanges = monthsOnCall;
```

## Set ranges of enabled dates based on a specific time zone

```javascript
$w('#myMobileDatePicker').timeZone = 'Pacific/Auckland';

// In 2022, New Zealand switches to daylight savings 
// time on September 25th

const enabledDates = [
  {
    startDate: new Date('06/10/2022 GMT+12'),
    endDate: new Date('08/15/2022 GMT+12')
  },
  {
    startDate: new Date('08/01/2022 GMT+12'),
    endDate: new Date('10/01/2022 GMT+13')
  }
];

$w('#myMobileDatePicker').enabledDateRanges = enabledDates;
```

## Disable weekends and holidays that occur during date ranges that are enabled

```javascript
const roster = [
    {
      startDate: new Date('1/1/2024'),
      endDate: new Date('1/31/2024')
    },
    {
      startDate: new Date('4/01/2024'),
      endDate: new Date('4/30/2024')
    },
    {
      startDate: new Date('7/01/2024'),
      endDate: new Date('7/31/2024')
    },
    {
      startDate: new Date('10/01/2024'),
      endDate: new Date('10/31/2024')
    }
  ];
  
  const holidays2024 = [
    {
      startDate: new Date('4/15/2024'),
      endDate: new Date('4/17/2024')
    },
    {
      startDate: new Date('12/25/2024'),
      endDate: new Date('01/01/2025')
    }
  ];
  
  $w('#myMobileDatePicker').enabledDateRanges = roster;        // Available on 1st month of each quarter   
  $w('#myMobileDatePicker').disabledDateRanges = holidays2024; // Not available on holidays
  $w('#myMobileDatePicker').disabledDaysOfWeek = [0, 6];       // Not available on weekends
```

---