1.4.5 • Published 10 years ago

koco-date-validation-rules v1.4.5

Weekly downloads
1
License
MIT
Repository
-
Last release
10 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

10 years ago

1.4.4

10 years ago

1.4.3

10 years ago

1.4.2

10 years ago

1.4.1

10 years ago

1.4.0

10 years ago

1.3.1

10 years ago

1.3.0

10 years ago

1.2.1

10 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago