From cb5b9d2c06a64803c6a21037859bf5550033a406 Mon Sep 17 00:00:00 2001 From: kitlaw Date: Thu, 15 Mar 2018 21:35:44 +0800 Subject: [PATCH] [FIXED] Support of /Do/ format for ordinal suffix "rd" --- src/jquery.daterangepicker.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jquery.daterangepicker.js b/src/jquery.daterangepicker.js index 5ddbbf2..2512f58 100755 --- a/src/jquery.daterangepicker.js +++ b/src/jquery.daterangepicker.js @@ -1316,9 +1316,9 @@ if (___format.match(/Do/)) { ___format = ___format.replace(/Do/, 'D'); - defaults[0] = defaults[0].replace(/(\d+)(th|nd|st)/, '$1'); + defaults[0] = defaults[0].replace(/(\d+)(th|rd|nd|st)/, '$1'); if (defaults.length >= 2) { - defaults[1] = defaults[1].replace(/(\d+)(th|nd|st)/, '$1'); + defaults[1] = defaults[1].replace(/(\d+)(th|rd|nd|st)/, '$1'); } } // set initiated to avoid triggerring datepicker-change event