Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(datepicker): Support semantic ui calendar options #165

Open
trevordaniels opened this issue Jul 6, 2017 · 6 comments
Open

feat(datepicker): Support semantic ui calendar options #165

trevordaniels opened this issue Jul 6, 2017 · 6 comments

Comments

@trevordaniels
Copy link
Contributor

Semantic UI Calendar has a number of useful config options that help it meet different use cases. Is it possible to get any or all of the following included?

monthFirst: true, // month before day when parsing/converting date from/to text
initialDate: null, // date to display initially when no date is selected (null = now)
startMode: false, // display mode to start in, can be 'year', 'month', 'day', 'hour', 'minute' (false = 'day')
multiMonth: 1, // show multiple months when in 'day' mode

@edcarroll
Copy link
Owner

Going through each of these:

  1. You can control how the date appears by using the localization service, and for an individual datepicker you can put the month first with localeOverrides.
  2. Initial date is certainly something that can be easily added, at the moment it defaults to the current date.
  3. Start mode is definitely also possible, the calendar views are designed to be easily configured so that should be ok.
  4. I tried to get the Semantic UI Calendar jsbin to give me an example of this - are you able to set up a demo with that calendar so I can see it in action please?

@trevordaniels
Copy link
Contributor Author

Thanks for looking at this. Here's a plunkr re 4. with multiple months working. I find this option useful only because the calendar by default disables previous and next month days when showing a month, making it misleading for users who think they cannot choose any dates beyond these. open issue

If its possible to enable those trailing/leading days that would be great too!

http://plnkr.co/edit/QscqlVfw0maq6cH2Ufa7

edcarroll added a commit that referenced this issue Jul 19, 2017
@harogaston
Copy link
Contributor

Pending:

  • Change style to differentiate trailing/leading days belonging to future/past months.

harogaston added a commit to harogaston/ng2-semantic-ui that referenced this issue Aug 6, 2017
- New input (optional) that sets the intial date to display (null = today)
- Updated demo page

Partially addresses edcarroll#165
harogaston added a commit to harogaston/ng2-semantic-ui that referenced this issue Aug 6, 2017
- New input (optional) that sets the intial date to display (null = today)
- Updated demo page

Partially addresses edcarroll#165
@harogaston
Copy link
Contributor

@trevordaniels What do you mean exactly by monthFirst?

@trevordaniels
Copy link
Contributor Author

@harogaston this setting allows switching the date format between mm/dd or dd/mm.

Ed's comments above suggest this can be handled through the localisation service. I haven't tested this yet.

@harogaston
Copy link
Contributor

@trevordaniels Ok then. It should be possible now after this commit gets merged.

All in all only point 3 (aka start mode) is missing.

edcarroll pushed a commit that referenced this issue Aug 13, 2017
* feat(datepicker) New input pickerInitialDate

- New input (optional) that sets the intial date to display (null = today)
- Updated demo page

Partially addresses #165

* Now pickerInitialDate only sets CalendarService.currentDate property

* feat(datepicker): Initial date support
- Code formatting
mcosta74 pushed a commit that referenced this issue Aug 14, 2017
* fix: Fixed AOT on SystemJS builder

Closes #209

* fix: Added custom FocusEvent interface (#231)

* fix: Added custom FocusEvent interface

Closes #202

FocusEvent isn't defined in UC browser, so added IFocusEvent with the property we need.

* style(util): Fixed tslint error

* chore(popup): Relaxed popper.js dependency (#228)

Follows up on #195

* fix(popup): Fixed delay causing destroyed view errors (#233)

Closes #189

* fix(select): Manually run change detector when option updates (#236)

* fix(select): Manually run change detector when option updates

Closes #213

* style(select): Fixed tslint error

* fix(select): Selected options now updated when options change (#232)

* fix(modal): Fixed aggressive autofocus sometimes causing errors (#237)

* fix(popup): Fixed conflict with BrowserAnimationsModule (#234)

* fix(popup): Fixed conflict with BrowserAnimationsModule

Closes #204

* style(popup): Fixed tslint error

* feat(popup): Added template context support (#238)

* fix(popup): Fixed focus events on popup (#243)

* feat(datepicker) Popup now honors locale and pickerLocaleOverrides (#215)

* Datepicker popup now honors locale and pickerLocaleOverrides

- Datepicker popup items now respect locale format
- Fixed a bug in zoom calendar mapping for datetime datepicker
- Fixed 'es' locale for consistency

(*) Partially addresses #164

* Added comments.

* Time of day values supported in locale definitions (#214)

* en-GB and en-US locales now use 12 hour format

Original "HH:mm" (23:59) -> Now "hh:mm aa" (11:59 p.m.)

* Fix locales Russian, Italian and Hebrew now extend from ILocaleValues.

* Added new IDatepickerFormatsLocaleValues fields:
- timesOfDay
- timesOfDayUppercase
- timesOfDayLowercase
to support proper formatting/parsing of dates in datepicker.

Updated Localization page

* Fixing code formatting

* feat(datepicker) Added initial date support for the datepicker (#216)

* feat(datepicker) New input pickerInitialDate

- New input (optional) that sets the intial date to display (null = today)
- Updated demo page

Partially addresses #165

* Now pickerInitialDate only sets CalendarService.currentDate property

* feat(datepicker): Initial date support
- Code formatting

* fix: Various minor bugfixes (#245)

* fix(select): Fixed destroyed view errors

* fix(modal): Fix modal auto closing when clicked

* fix(popup): Removed console log in focus handler

* fix(popup): Forced import of TemplateRef

* fix: Fixed AOT on SystemJS builder

Closes #209
gotenxds pushed a commit to gotenxds/ng2-semantic-ui that referenced this issue Aug 15, 2017
gotenxds pushed a commit to gotenxds/ng2-semantic-ui that referenced this issue Aug 15, 2017
…roll#216)

* feat(datepicker) New input pickerInitialDate

- New input (optional) that sets the intial date to display (null = today)
- Updated demo page

Partially addresses edcarroll#165

* Now pickerInitialDate only sets CalendarService.currentDate property

* feat(datepicker): Initial date support
- Code formatting
gotenxds pushed a commit to gotenxds/ng2-semantic-ui that referenced this issue Aug 15, 2017
* fix: Fixed AOT on SystemJS builder

Closes edcarroll#209

* fix: Added custom FocusEvent interface (edcarroll#231)

* fix: Added custom FocusEvent interface

Closes edcarroll#202

FocusEvent isn't defined in UC browser, so added IFocusEvent with the property we need.

* style(util): Fixed tslint error

* chore(popup): Relaxed popper.js dependency (edcarroll#228)

Follows up on edcarroll#195

* fix(popup): Fixed delay causing destroyed view errors (edcarroll#233)

Closes edcarroll#189

* fix(select): Manually run change detector when option updates (edcarroll#236)

* fix(select): Manually run change detector when option updates

Closes edcarroll#213

* style(select): Fixed tslint error

* fix(select): Selected options now updated when options change (edcarroll#232)

* fix(modal): Fixed aggressive autofocus sometimes causing errors (edcarroll#237)

* fix(popup): Fixed conflict with BrowserAnimationsModule (edcarroll#234)

* fix(popup): Fixed conflict with BrowserAnimationsModule

Closes edcarroll#204

* style(popup): Fixed tslint error

* feat(popup): Added template context support (edcarroll#238)

* fix(popup): Fixed focus events on popup (edcarroll#243)

* feat(datepicker) Popup now honors locale and pickerLocaleOverrides (edcarroll#215)

* Datepicker popup now honors locale and pickerLocaleOverrides

- Datepicker popup items now respect locale format
- Fixed a bug in zoom calendar mapping for datetime datepicker
- Fixed 'es' locale for consistency

(*) Partially addresses edcarroll#164

* Added comments.

* Time of day values supported in locale definitions (edcarroll#214)

* en-GB and en-US locales now use 12 hour format

Original "HH:mm" (23:59) -> Now "hh:mm aa" (11:59 p.m.)

* Fix locales Russian, Italian and Hebrew now extend from ILocaleValues.

* Added new IDatepickerFormatsLocaleValues fields:
- timesOfDay
- timesOfDayUppercase
- timesOfDayLowercase
to support proper formatting/parsing of dates in datepicker.

Updated Localization page

* Fixing code formatting

* feat(datepicker) Added initial date support for the datepicker (edcarroll#216)

* feat(datepicker) New input pickerInitialDate

- New input (optional) that sets the intial date to display (null = today)
- Updated demo page

Partially addresses edcarroll#165

* Now pickerInitialDate only sets CalendarService.currentDate property

* feat(datepicker): Initial date support
- Code formatting

* fix: Various minor bugfixes (edcarroll#245)

* fix(select): Fixed destroyed view errors

* fix(modal): Fix modal auto closing when clicked

* fix(popup): Removed console log in focus handler

* fix(popup): Forced import of TemplateRef

* fix: Fixed AOT on SystemJS builder

Closes edcarroll#209
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants