{"id":24678610,"url":"https://github.com/samcodex/petit-calendar","last_synced_at":"2026-05-19T04:02:52.783Z","repository":{"id":57322442,"uuid":"167638928","full_name":"samcodex/petit-calendar","owner":"samcodex","description":"Angular small localization calendar","archived":false,"fork":false,"pushed_at":"2019-01-29T21:09:01.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-04T06:02:52.503Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samcodex.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-26T02:01:45.000Z","updated_at":"2019-01-29T21:09:03.000Z","dependencies_parsed_at":"2022-08-26T01:11:21.155Z","dependency_job_id":null,"html_url":"https://github.com/samcodex/petit-calendar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samcodex/petit-calendar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcodex%2Fpetit-calendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcodex%2Fpetit-calendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcodex%2Fpetit-calendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcodex%2Fpetit-calendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samcodex","download_url":"https://codeload.github.com/samcodex/petit-calendar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samcodex%2Fpetit-calendar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270932579,"owners_count":24670241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-26T13:17:45.115Z","updated_at":"2026-05-19T04:02:52.688Z","avatar_url":"https://github.com/samcodex.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PetitCalendar\n\nAngular small localization calendar.\n\n\u003cimg src=\"src/assets/calendar.png\" width=\"200\"\u003e\n\n## Installation\n\nnpm install petit-calendar --save\n\n## Usage\n### * Import PetitCalendarModule in the component module\n\n```\n  import { PetitCalendarModule } from 'petit-calendar';\n```\n\n```\n  imports: [\n    ...\n    PetitCalendarModule\n  ]\n```\n\n### * To use PetitCalendar component\n\n```\n  \u003cngp-petit-calendar\u003e\u003c/ngp-petit-calendar\u003e\n```\n\nProperties:\n```\n  @Input()\n  locale = 'en';\n  // locale code\n\n  @Input()\n  viewDate = new Date();\n  // the date to display\n\n  @Input()\n  indicator = false;\n  // each day has two event indicators below the day number\n  // true to use event indicators, set the indicators using PetitcalendarService\n\n  @Input()\n  highlightSelectedDate = false;\n  // true to highlight the selected date\n\n  @Input()\n  highlightSelectedWeek = true;\n  // true to highlight the selected week\n\n  @Input()\n  showWeekDayName = true;\n  // true to show the name of day of the week\n\n  @Output()\n  changeViewDate = new EventEmitter\u003cDate\u003e();\n  // emit the selected date after selecting the date\n\n  @Output()\n  changeViewMonth = new EventEmitter\u003cDate\u003e();\n  // emit the first date of the month when clicking 'previous' or 'next'\n```\n\n### * Use PetitCalendarService to get the current calendar\n\n* import PetitCalendarService\n```\n  import PetitCalendarService from 'petit-calendar';\n\n  ...\n  providers: [\n    ...,\n    PetitCalendarService\n  ]\n```\n\n* inject PetitcalendarService\n```\n  ...\n  constructor(\n    ...,\n    private calendarService: PetitCalendarService\n  ){\n\n  }\n```\n\n* get the current calendar\n```\n  this.calendarService.getCalendar().subscribe(\n    (calendar: Calendar) =\u003e {\n      // set day indicators\n      calendar.days.forEach(day =\u003e {\n        day.indicators.first = (condition);  // green color, indicate the day contains available time slot\n        day.indicators.second = (condition); // red color, indicate the day contains booked time slot\n      });\n    }\n  );\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamcodex%2Fpetit-calendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamcodex%2Fpetit-calendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamcodex%2Fpetit-calendar/lists"}