Opened 8 years ago

Closed 8 years ago

#8220 closed feature (notabug)

Make targeting weeks/days of week by CSS possible

Reported by: 1kenthomas Owned by: 1kenthomas
Priority: minor Milestone: 1.9.0
Component: ui.datepicker Version: 1.8.18
Keywords: Cc:
Blocked by: Blocking:

Description

Howdy,

It would be great if it were possible to target weeks or days of the week (such as mondays etc) by pure CSS-- it would expose the end-goal to people who know only CSS.

This is particularly important in systems such as Drupal, where one would rather not modify the base install of this module, creating a potential maintenance issue.

The above is based on the Drupal 7 distro; if status has changed, beat me with a wet noodle.

Thanks,

Ken

Change History (6)

comment:1 in reply to:  description ; Changed 8 years ago by Scott González

Component: ui.coreui.datepicker
Owner: set to 1kenthomas
Status: newpending

Replying to 1kenthomas:

The above is based on the Drupal 7 distro; if status has changed, beat me with a wet noodle.

The above what? Can you please explain the use cases for this? What is Drupal trying to accomplish and why?

comment:2 in reply to:  1 Changed 8 years ago by 1kenthomas

Status: pendingnew

Replying to scott.gonzalez:

Replying to 1kenthomas:

The above is based on the Drupal 7 distro; if status has changed, beat me with a wet noodle.

The above what? Can you please explain the use cases for this? What is Drupal trying to accomplish and why?

"The above part of the post :)."

Sorry, this has sat on my issue queue on drupal.org and I'm just seeing it and transferring here.

Typically, Drupal would stripe any UI element such as this (the calendar), so that there would be a way to select "all mondays" for instance from pure CSS (without using jQuery).

Not only is this pure convenience; in a CMS system with permissions levels, it's quite common to grant that a user class has permission to alter CSS, but not more. And in fact this was possible with our previous implementations (not that this necessarily means much, from your side).

Regardless, it's also darn convenient.

Last edited 8 years ago by 1kenthomas (previous) (diff)

comment:3 Changed 8 years ago by Scott González

Status: newpending

I'm still unsure what the use case is; you mention striping and allowing users to style elements. Striping is generally for readability, which doesn't seem to be much of a problem with datepickers. I'm not sure what to make of the user permissions statement, since allowing styling of arbitrary elements is far form a use case.

What is the underlying purpose of the striping? In what cases do users want columns in a datepicker to be striped? Do you have examples of existing calendars with this type of treatment?

Last edited 8 years ago by Scott González (previous) (diff)

comment:4 in reply to:  3 Changed 8 years ago by 1kenthomas

Status: pendingnew

Replying to scott.gonzalez:

I'm still unsure what the use case is; you mention striping and allowing users to style elements. Striping is generally for readability, which doesn't seem to be much of a problem with datepickers. I'm not sure what to make of the user permissions statement, since allowing styling of arbitrary elements is far form a use case.

What is the underlying purpose of the striping? In what cases do users want columns in a datepicker to be striped? Do you have examples of existing calendars with this type of treatment?

I'm not sure we're on the same page.

All we want is a css class (or etc) to exist so someone with access to add CSS can make all Mondays blue when every other day is yellow. As in "our group only meets on Mondays in the first and third weeks, we'd like to highlight first and third mondays in blue on our calendar."

The striping does not refer to appearance, but to the fact that you're laying stripes of selectors for x,y across the grid.

Last edited 8 years ago by 1kenthomas (previous) (diff)

comment:5 Changed 8 years ago by Scott González

Status: newpending

Isn't that what beforeShowDay is for? Why not expose the actual functionality of specifying dates rather than a very limited system of classes for each day of the week? What you're asking for would definitely be limiting. You could probably mark first and third Monday, but it'd be impossible to mark every other Monday (CSS has no knowledge of week since starting date, so choosing odd or even may as well change arbitrarily).

I'm inclined to close this as won't fix because the proposal seems a bit misguided.

comment:6 Changed 8 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.