Security News
Combatting Alert Fatigue by Prioritizing Malicious Intent
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
ion-datepicker
Advanced tools
npm i ion-datepicker --save
import { DatePickerModule } from 'ion-datepicker';
imports: [
IonicModule.forRoot(App),
DatePickerModule,
],
<span ion-datepicker [(value)]="localDate" [min]="localDate" clear class="ScheduleDate">
<span>{{localDate | date}} <ion-icon name="clipboard" item-left ></ion-icon> </span>
</span>
import { DatePickerDirective } from 'ion-datepicker';
@ViewChild(DatePickerDirective) private datepickerDirective:DatePickerDirective;
public closeDatepicker(){
this.datepickerDirective.modal.dismiss();
}
[value]
- defines the initial value, can be two bindable as in [(value)].
[min]
- minimum date that user is allowed to select. (not required)
[max]
- maximum date that user is allowed to select. (not required)
[disabledDates]
- An array of dates that should be disabled (not required)
[calendar]
- A boolean that determines whether to show calendar or not. Defaults to true.
[markDates]
- An array of dates that should be marked with background color (not required)
(ionChanged)
- an event emitter that returns the date as a $event.
(ionCanceled)
- an event that is raised when the cancel button is activated. Returns no data.
(ionSelected)
- an event that is raised when a date is selected
[headerClasses]
- a bridge to the header classes of the directive using ngClass (string, array or object) (not required)
[bodyClasses]
- a bridge to the date classes of the directive using ngClass (string, array or object) (not required)
[modalOptions]
- a modal is used to display the picker to configure the animation or other options you may use this
[locale]
- for translating the calendar. Avaliable local is en-US, en-UK, he-IL, pt-BR, ru-RU, de, fi, fr-FR, zh-TW, zh-CN, ja-JP. Please note en-US locale starts the calendar with monday and en-UK starts it with sunday
[localeStrings]
- if you dont want to use the built translations - accepts an object { weekdays: string[], months: string[], monday:boolean },
For example:
{ monday:true, weekdays: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] },
[okText]
- text for the ok button
[cancelText]
- text for the cancel button
FAQs
A date picker for ionic
The npm package ion-datepicker receives a total of 38 weekly downloads. As such, ion-datepicker popularity was classified as not popular.
We found that ion-datepicker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.