heliomarpm / ion-calendar

📅 A date picker component for ionic6+
https://ioncalendar-demo.web.app/
MIT License
2 stars 2 forks source link

[type] @Input seems to be ignored #5

Open vicatcu opened 2 months ago

vicatcu commented 2 months ago

Describe the bug

'moment' used to be allowed, but it's not allowed in this library. Also no matter what valid value I use, the outcome of range selection always seems to be a strings (not ISO-8601 formatted even).

To Reproduce

Use the example setup and try changing the value of the type input variable which is bound to the component [type] input

Code snippet

js
  type='luxon' // or object or js-date
  optionsRange: ICalendarComponentOptions = {
    pickMode: 'range',
    color: 'primary',
    from: new Date(1) // can select backwards dates
  };

html
  <ion-calendar [(ngModel)]="dateRange"
    [options]="optionsRange"
    [type]="type"
    [format]="'YYYY-MM-DD'">
  </ion-calendar>

Expected behavior

The type input should be taken into account

Node.js Version

No response

OS

No response

Additional Library Versions

No response

Additional context/Screenshots

No response

heliomarpm commented 2 months ago

moment is no longer supported. I'll check here, but if you have a demo repository it would help a lot. tks