1.4.5 • Published 8 years ago

koco-date-validation-rules v1.4.5

Weekly downloads
1
License
MIT
Repository
-
Last release
8 years ago

koco-date-validation-rules

Knockout Validation rules for dates

Installation

bower install koco-date-validation-rules

Usage with KOCO

This is a shared module that is used in many other modules. The convention is to require the handler in the knockout-validation-rules.js file like so:

define([
  ...
  'bower_components/koco-date-validation-rules/src/date-validation-rules'
  ...
],

Usage

There are two date validation rules included.

###dateFormat

Checks the current value against a user-specified date format. If no format is provided, the default is 'YYYY-MM-DD HH:mm'

##dateIsAfter

Checks the current value against another date to ensure that the first is later. Useful for date range pickers.

endDate.extend({
    dateIsAfter: self.observableContent().startDate
});

##dateIsBefore

startDate.extend({
    dateIsBefore: self.observableContent().endDate
});

##dateIsSame

1.4.5

8 years ago

1.4.4

8 years ago

1.4.3

8 years ago

1.4.2

8 years ago

1.4.1

8 years ago

1.4.0

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago