Complete Date & Time Picker Suite for Angular
π Documentation β’ π Quick Start β’ π¦ Components β’ π€ Contributing
NGX-Chronica is a comprehensive Angular library providing 6 specialized date and time picker components that fill critical gaps in the Angular ecosystem. Built with modern Angular practices, full TypeScript support, and zero external dependencies.
The Angular ecosystem lacks robust, production-ready Date &Time Picker components. NGX-Chronica addresses these gaps with components that are:
- β Battle-Tested - Used in production applications
- β Zero Dependencies - No Moment.js, date-fns, or other heavy libraries
- β Fully Typed - Complete TypeScript definitions
- β Accessible - WCAG 2.1 AA compliant
- β Themeable - 8 color themes + dark mode
- β i18n Ready - 11 built-in locales + custom locale support
| Component | Description | Key Features |
|---|---|---|
| DatePicker | Single date selection with popup | Min/max dates, disabled dates, locale support |
| DateRange | Start/end date selection | Hover preview, quick presets, validation |
| InlineCalendar | Always-visible calendar | Embedded display, no popup overhead |
| TimePicker | Time selection (12h/24h) | Step intervals, min/max time, seconds support |
| DateTimePicker | Combined date + time | Unified interface, flexible layout |
| DurationPicker | Time span selection | Days/hours/minutes/seconds, preset durations |
- ποΈ 6 Specialized Components - Complete toolkit for all date/time needs
- π¨ 8 Color Themes - Blue, Green, Purple, Red, Orange, Teal, Pink, Indigo
- π 11 Built-in Locales - EN, ES, FR, DE, IT, PT, ZH, JA, KO, RU + custom
- π± Responsive - Mobile-friendly with touch support
- π« Smart Validation - Min/max constraints, disabled dates/times
- π Form Integration - Full
ControlValueAccessorsupport - β‘ Standalone Components - Works with standalone or NgModule apps
- βΏ Accessible - Keyboard navigation, ARIA labels, screen readers
- π― TypeScript First - Comprehensive type definitions
- π¨ Customizable - CSS custom properties for theming
npm install ngx-chronicaimport { Component } from '@angular/core';
import { ChronicaDatepickerComponent } from 'ngx-chronica';
@Component({
selector: 'app-example',
standalone: true,
imports: [ChronicaDatepickerComponent],
template: `
<chronica-datepicker
[(ngModel)]="selectedDate"
[config]="{ colorTheme: 'blue', theme: 'light' }"
(dateSelected)="onDateSelected($event)"
/>
`,
})
export class ExampleComponent {
selectedDate: Date | null = new Date();
onDateSelected(date: Date) {
console.log('Selected:', date);
}
}This is a monorepo containing:
ngx-chronica/
βββ projects/chronica/ # π¦ Library source code
β βββ src/lib/
β β βββ components/ # 6 picker components
β β βββ models/ # TypeScript interfaces
β β βββ utils/ # Utility functions
β β βββ chronica.module.ts # Optional NgModule
β βββ public-api.ts # Public API exports
βββ src/ # π Documentation website
β βββ app/
β β βββ components/ # Demo components
β β βββ features/ # Feature pages
β βββ assets/ # Static assets
βββ docs/ # π Additional documentation
- Node.js 18+ and npm 9+
- Angular CLI 19+
# Clone the repository
git clone https://github.com/klajdm/ngx-chronica.git
cd ngx-chronica
# Install dependencies
npm install
# Start development server (documentation site)
npm start
# Build the library
npm run build:lib
# Run tests
npm test
# Lint code
npm run lint- Create component in
projects/chronica/src/lib/components/ - Implement
ControlValueAccessorinterface - Add models to
projects/chronica/src/lib/models/ - Export in
public-api.ts - Add to
ChronicaModule - Create demo page in
src/app/features/ - Update documentation
# Run unit tests
npm test
# Run tests with coverage
npm run test:coverage
# Run e2e tests
npm run e2e- Standalone First - All components are standalone by default
- Type Safety - Comprehensive TypeScript interfaces
- Zero Dependencies - No external date libraries
- Accessibility - WCAG 2.1 AA compliant
- Performance - OnPush change detection, lazy loading
- Modularity - Tree-shakeable exports
All picker components follow this pattern:
@Component({
standalone: true,
providers: [
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => Component), multi: true },
],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ChronicaComponent implements ControlValueAccessor, OnInit, OnDestroy {
// Angular CDK Overlay for popups
private overlayRef: OverlayRef | null = null;
// ControlValueAccessor implementation
writeValue(value: T): void {}
registerOnChange(fn: any): void {}
registerOnTouched(fn: any): void {}
setDisabledState(isDisabled: boolean): void {}
}We welcome contributions! Here's how you can help:
- π Report Bugs - Open an issue
- π‘ Suggest Features - Start a discussion
- π Improve Docs - Fix typos, add examples
- π§ Submit PRs - Fix bugs, add features
- β Star the Repo - Show your support!
- Fork the repository
- Create a feature branch -
git checkout -b feature/amazing-feature - Follow coding standards - Run
npm run lint - Write tests - Maintain >90% coverage
- Update documentation - Add examples and API docs
- Commit with conventional commits -
feat:,fix:,docs:, etc. - Push to your fork -
git push origin feature/amazing-feature - Open a Pull Request - Describe your changes
- Use TypeScript strict mode
- Follow Angular style guide
- Use OnPush change detection
- Implement ControlValueAccessor for form components
- Add ARIA attributes for accessibility
- Write comprehensive tests
feat(datepicker): add keyboard navigation
fix(time-picker): resolve 12h/24h conversion bug
docs(readme): update installation instructions
test(duration): add validation tests
perf(calendar): optimize date generation
style(components): apply consistent spacing
refactor(utils): extract date utilities
ci(github): add automated testing
- β DatePicker component
- β DateRange component
- β InlineCalendar component
- β TimePicker component
- β DateTimePicker component
- β DurationPicker component
- β 11 built-in locales
- β 8 color themes
- β Dark mode support
- π Timezone Picker - Global timezone selection
- π Recurring Event Picker - Schedule repeating events
- π Calendar Heatmap - Data visualization over time
- π Month/Year Picker - Quick month/year selection
- π Week Picker - Select entire weeks
- π Quarter Picker - Business quarter selection
- π Age Calculator - Date difference calculations
- π Countdown Timer - Live countdown displays
- π± Enhanced mobile gestures (swipe navigation)
- β¨οΈ Advanced keyboard shortcuts
- π¨ Theme builder tool
- π More locale support (20+ languages)
- π¦ Smaller bundle size optimizations
- π§ͺ Comprehensive E2E test suite
NGX-Chronica is optimized for performance:
- Tree-shakeable - Only import what you need
- OnPush Change Detection - Minimal re-renders
- Lazy Loading - Components load on demand
- Small Bundle Size - ~15KB per component (gzipped)
- No External Dependencies - Zero runtime dependencies
- Virtual Scrolling - Efficient rendering for large lists
| Angular | NGX-Chronica | Status |
|---|---|---|
| 15.x | 1.x | β Supported |
| 16.x | 1.x | β Supported |
| 17.x | 1.x | β Supported |
| 18.x | 1.x | β Supported |
| 19.x | 1.x | β Supported |
MIT License - see LICENSE file for details.
- π Documentation - Full API docs and examples
- π Getting Started - Quick start guide
- π Issue Tracker - Report bugs
- π¬ Discussions - Ask questions
- π¦ npm Package - Install via npm
- π€ Contributing - Contribution guide
Made with β€οΈ for the Angular community