Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
ElaadF committed Nov 2, 2023
1 parent f7a80d1 commit 38e5bbf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,8 @@ case object OrderedStringComparator extends TStringComparator {

case object DateComparator extends LDAPCriterionType {
override val comparators = OrderedComparators.comparators.filterNot(c => c == Regex || c == NotRegex)
val fmt = "dd/MM/yyyy"
val frenchFmt = DateTimeFormat.forPattern(fmt).withLocale(Locale.FRANCE)
val fmt = "yyyy/MM/dd"
val frenchFmt = DateTimeFormat.forPattern(fmt).withLocale(Locale.FRENCH)
def error(value: String, e: Exception) = Inconsistency(
s"Invalide date: '${value}', expected format is: '${fmt}'. Error was: ${e.getMessage}"
)
Expand All @@ -579,6 +579,7 @@ case object DateComparator extends LDAPCriterionType {
// init a jquery datepicker
override def initForm(formId: String): JsCmd = OnLoad(JsRaw("""var init = $.datepicker.regional['en'];
init['showOn'] = 'focus';
init['dateFormat'] = 'yy/mm/dd';
$('#%s').datepicker(init);
""".format(formId)))
override def destroyForm(formId: String): JsCmd = OnLoad(JsRaw("""$('#%s').datepicker( "destroy" );""".format(formId)))
Expand Down

0 comments on commit 38e5bbf

Please sign in to comment.