beforeShowDay option #305

Merged
merged 1 commit into from Apr 17, 2013

Conversation

Projects
None yet
6 participants
@gabriel
Contributor

gabriel commented Jan 8, 2013

Adding beforeShowDay option. Very similar to jquery datepicker beforeShowDay option at http://api.jqueryui.com/datepicker/#option-beforeShowDay

@InVeX

This comment has been minimized.

Show comment Hide comment
@InVeX

InVeX Feb 19, 2013

Thank You!

InVeX commented Feb 19, 2013

Thank You!

@eternicode

This comment has been minimized.

Show comment Hide comment
@eternicode

eternicode Feb 19, 2013

Contributor

Thanks for this @gabriel, could you possibly add some unit tests for the feature? Thanks!

Contributor

eternicode commented Feb 19, 2013

Thanks for this @gabriel, could you possibly add some unit tests for the feature? Thanks!

@gabriel

This comment has been minimized.

Show comment Hide comment
@gabriel

gabriel Feb 19, 2013

Contributor

yeah, added a test...

Contributor

gabriel commented Feb 19, 2013

yeah, added a test...

@eternicode eternicode referenced this pull request Feb 21, 2013

Closed

Disable specific dates #349

@jrobeson

This comment has been minimized.

Show comment Hide comment
@jrobeson

jrobeson Apr 5, 2013

so what's the status of this?

jrobeson commented Apr 5, 2013

so what's the status of this?

@InVeX

This comment has been minimized.

Show comment Hide comment
@InVeX

InVeX Apr 6, 2013

Status is "Closed" due to #349 Pull Request

InVeX commented Apr 6, 2013

Status is "Closed" due to #349 Pull Request

@jrobeson

This comment has been minimized.

Show comment Hide comment
@jrobeson

jrobeson Apr 7, 2013

do what InVex? that PR was closed because it used hardcoded dates. using a function as eternicode suggests is the way to go .

jrobeson commented Apr 7, 2013

do what InVex? that PR was closed because it used hardcoded dates. using a function as eternicode suggests is the way to go .

@InVeX

This comment has been minimized.

Show comment Hide comment
@InVeX

InVeX Apr 7, 2013

Ah, I see, you are right :)
So I guess this can be merged.

InVeX commented Apr 7, 2013

Ah, I see, you are right :)
So I guess this can be merged.

@gmesnard

This comment has been minimized.

Show comment Hide comment
@gmesnard

gmesnard Apr 10, 2013

Hi ! Like jrobeson, when this pull request can be merged ? It's very useful to remove dates in calendar (like holiday) ?
I hope soon ;)
Thx

Hi ! Like jrobeson, when this pull request can be merged ? It's very useful to remove dates in calendar (like holiday) ?
I hope soon ;)
Thx

@eternicode eternicode referenced this pull request Apr 17, 2013

Closed

Release 1.1.0 #412

@eternicode

This comment has been minimized.

Show comment Hide comment
@eternicode

eternicode Apr 17, 2013

Contributor

Committed a slightly modified version that I think will be a bit more future-proof and extensible:

beforeShowDay

Function(Date). Default: $.noop

A function that takes a date as a parameter and returns one of the following values:

  • undefined to have no effect
  • A Boolean, indicating whether or not this date is selectable
  • A String representing additional CSS classes to apply to the date's cell
  • An object with the following properties:
    • enabled: same as the Boolean value above
    • classes: same as the String value above
    • tooltip: a tooltip to apply to this date, via the title HTML attribute
Contributor

eternicode commented Apr 17, 2013

Committed a slightly modified version that I think will be a bit more future-proof and extensible:

beforeShowDay

Function(Date). Default: $.noop

A function that takes a date as a parameter and returns one of the following values:

  • undefined to have no effect
  • A Boolean, indicating whether or not this date is selectable
  • A String representing additional CSS classes to apply to the date's cell
  • An object with the following properties:
    • enabled: same as the Boolean value above
    • classes: same as the String value above
    • tooltip: a tooltip to apply to this date, via the title HTML attribute

eternicode added a commit that referenced this pull request Apr 17, 2013

Merge #305 from gabriel/master
beforeShowDay option

@eternicode eternicode merged commit 06c6809 into uxsolutions:master Apr 17, 2013

1 check passed

default The Travis build passed
Details

@eternicode eternicode referenced this pull request May 30, 2013

Closed

Option "selected" #198

@actuallymab

This comment has been minimized.

Show comment Hide comment
@actuallymab

actuallymab Nov 21, 2013

Hello @eternicode can we reload a datepicker with beforeShowDay?

Hello @eternicode can we reload a datepicker with beforeShowDay?

@eternicode

This comment has been minimized.

Show comment Hide comment
@eternicode

eternicode Nov 23, 2013

Contributor

@aydnbhdr beforeShowDay will be called for each day rendered -- but what do you mean by "reload"?

Contributor

eternicode commented Nov 23, 2013

@aydnbhdr beforeShowDay will be called for each day rendered -- but what do you mean by "reload"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment