calendar_date_select 1.15 → 1.16
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/History.txt +29 -0
- data/Manifest.txt +1 -1
- data/{Readme.txt → README.txt} +2 -0
- data/Rakefile +18 -13
- data/VERSION +1 -0
- data/calendar_date_select.gemspec +96 -0
- data/js_test/functional/.tmp_cds_test.html +306 -0
- data/js_test/functional/cds_test.html +31 -0
- data/js_test/functional/format_iso_date_test.html +52 -0
- data/lib/calendar_date_select/calendar_date_select.rb +10 -4
- data/lib/calendar_date_select/form_helpers.rb +16 -4
- data/public/javascripts/calendar_date_select/calendar_date_select.js +9 -4
- data/public/javascripts/calendar_date_select/format_american.js +2 -1
- data/public/javascripts/calendar_date_select/format_danish.js +31 -0
- data/public/javascripts/calendar_date_select/format_iso_date.js +19 -36
- data/public/javascripts/calendar_date_select/locale/ar.js +10 -0
- data/public/javascripts/calendar_date_select/locale/da.js +11 -0
- data/public/javascripts/calendar_date_select/locale/es.js +11 -0
- data/public/javascripts/calendar_date_select/locale/fr.js +2 -1
- data/public/javascripts/calendar_date_select/locale/it.js +9 -0
- data/public/javascripts/calendar_date_select/locale/nl.js +11 -0
- data/public/javascripts/calendar_date_select/locale/pl.js +2 -1
- data/public/javascripts/calendar_date_select/locale/sl.js +11 -0
- data/public/stylesheets/calendar_date_select/green.css +142 -0
- data/spec/calendar_date_select/form_helpers_spec.rb +23 -0
- data/spec/calendar_date_select/includes_helper_spec.rb +46 -0
- data/spec/spec_helper.rb +1 -1
- metadata +52 -39
@@ -127,6 +127,21 @@
|
|
127
127
|
assert($('global').onchange_called, "onchange wasnt called");
|
128
128
|
$("global").remove();
|
129
129
|
}},
|
130
|
+
test_onchangeCallbackChangedOnclear: function() { with(this){
|
131
|
+
$("cds_test").up().build("div", {id: "global"});
|
132
|
+
cds = new CalendarDateSelect($("cds_test"), {time: "mixed",
|
133
|
+
onchange: function() { $("global").onchange_called = true},
|
134
|
+
});
|
135
|
+
$("cds_test").value = "";
|
136
|
+
cds.clearDate();
|
137
|
+
assert( ! $('global').onchange_called, "onchange was called, when the value wasn't actually changed");
|
138
|
+
$("cds_test").value = "boogy";
|
139
|
+
cds.clearDate();
|
140
|
+
assert( $('global').onchange_called, "onchange wasnt called, but should ahve been");
|
141
|
+
cds.close();
|
142
|
+
$("global").remove();
|
143
|
+
}},
|
144
|
+
|
130
145
|
test_disabledElement_cantUpdate: function() {with(this){
|
131
146
|
$("cds_test").value = "May 10, 2007";
|
132
147
|
$("cds_test").disabled = true;
|
@@ -201,6 +216,22 @@
|
|
201
216
|
assert(cds.use_time)
|
202
217
|
cds.close();
|
203
218
|
}},
|
219
|
+
test_parseDate_defaultTime_javaScriptFunctionPassed_shouldReturnDateFromJavaScriptFunction: function() {with(this){
|
220
|
+
$("cds_test").value = " ";
|
221
|
+
cds = new CalendarDateSelect($("cds_test"), {default_time:function() { return new Date('January 02, 2008 2:00 PM') }});
|
222
|
+
assertEqual('2008', cds.selected_date.getFullYear());
|
223
|
+
assertEqual('2008', cds.date.getFullYear());
|
224
|
+
assert(cds.selection_made)
|
225
|
+
cds.close();
|
226
|
+
}},
|
227
|
+
test_parseDate_defaultTime_javaScriptDatePassed_shouldReturnJavaScriptDate: function() {with(this){
|
228
|
+
$("cds_test").value = " ";
|
229
|
+
cds = new CalendarDateSelect($("cds_test"), {default_time:new Date('January 02, 2007 05:45 PM') });
|
230
|
+
assertEqual('2007', cds.selected_date.getFullYear());
|
231
|
+
assertEqual('2007', cds.date.getFullYear());
|
232
|
+
assert(cds.selection_made)
|
233
|
+
cds.close();
|
234
|
+
}},
|
204
235
|
test_passDivElement__shouldUseChildInputForTargetElement: function() {with(this){
|
205
236
|
cds = new CalendarDateSelect($("cds_test_div"), {time:true});
|
206
237
|
assertEqual("INPUT", cds.target_element.nodeName)
|
@@ -0,0 +1,52 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<title>Format ISO Date Test Cases</title>
|
7
|
+
<script src="../prototype.js" type="text/javascript"></script>
|
8
|
+
<script src="../unittest.js" type="text/javascript"></script>
|
9
|
+
<!-- other JavaScript includes -->
|
10
|
+
<script src="../../public/javascripts/calendar_date_select/calendar_date_select.js" type="text/javascript"></script>
|
11
|
+
<script src="../../public/javascripts/calendar_date_select/format_iso_date.js" type="text/javascript"></script>
|
12
|
+
<link rel="stylesheet" href="../test.css" type="text/css" />
|
13
|
+
|
14
|
+
</head>
|
15
|
+
<body>
|
16
|
+
|
17
|
+
<!-- Log output -->
|
18
|
+
<div id="testlog"> </div>
|
19
|
+
|
20
|
+
<!-- here go any elements you do the testing on -->
|
21
|
+
<div id="cds_test_div">
|
22
|
+
<input type="text" id="cds_test" />
|
23
|
+
</div>
|
24
|
+
|
25
|
+
<!-- Tests -->
|
26
|
+
<script type="text/javascript" language="javascript">
|
27
|
+
// <![CDATA[
|
28
|
+
new Test.Unit.Runner({
|
29
|
+
setup: function() { with(this){
|
30
|
+
}},
|
31
|
+
teardown: function() { with(this){
|
32
|
+
}},
|
33
|
+
testParsing_withTime: function() { with(this) {
|
34
|
+
time = Date.parseFormattedString("2009-01-05 12:30")
|
35
|
+
assertEqual(2009, time.getFullYear());
|
36
|
+
assertEqual(0, time.getMonth());
|
37
|
+
assertEqual(5, time.getDate());
|
38
|
+
assertEqual(12, time.getHours());
|
39
|
+
assertEqual(30, time.getMinutes());
|
40
|
+
}},
|
41
|
+
testParsing_withoutTime: function() { with(this) {
|
42
|
+
time = Date.parseFormattedString("2009-01-05")
|
43
|
+
assertEqual(2009, time.getFullYear());
|
44
|
+
assertEqual(0, time.getMonth());
|
45
|
+
assertEqual(5, time.getDate());
|
46
|
+
}}
|
47
|
+
|
48
|
+
});
|
49
|
+
// ]]>
|
50
|
+
</script>
|
51
|
+
</body>
|
52
|
+
</html>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module CalendarDateSelect
|
2
|
-
VERSION = '1.
|
2
|
+
VERSION = '1.16'
|
3
|
+
|
3
4
|
FORMATS = {
|
4
5
|
:natural => {
|
5
6
|
:date => "%B %d, %Y",
|
@@ -20,6 +21,11 @@ module CalendarDateSelect
|
|
20
21
|
:time => " %H:%M",
|
21
22
|
:javascript_include => "format_finnish"
|
22
23
|
},
|
24
|
+
:danish => {
|
25
|
+
:date => "%d/%m/%Y",
|
26
|
+
:time => " %H:%M",
|
27
|
+
:javascript_include => "format_danish"
|
28
|
+
},
|
23
29
|
:american => {
|
24
30
|
:date => "%m/%d/%Y",
|
25
31
|
:time => " %I:%M %p",
|
@@ -57,7 +63,7 @@ module CalendarDateSelect
|
|
57
63
|
# :image => "custom_calendar_picker.png"
|
58
64
|
# )
|
59
65
|
def self.default_options
|
60
|
-
@
|
66
|
+
@calendar_date_select_default_options ||= { :image => "calendar_date_select/calendar.gif" }
|
61
67
|
end
|
62
68
|
|
63
69
|
# Set the picker image. Provide the image url the same way you would provide it to image_tag
|
@@ -72,7 +78,7 @@ module CalendarDateSelect
|
|
72
78
|
# puts CalendarDateSelect.format[:date]
|
73
79
|
# => "%d/%m/%Y"
|
74
80
|
def self.format
|
75
|
-
@
|
81
|
+
@calendar_date_select_format ||= FORMATS[:natural]
|
76
82
|
end
|
77
83
|
|
78
84
|
# Set the format. To see a list of available formats, CalendarDateSelect::FORMATS.keys, or open lib/calendar_date_select/calendar_date_select.rb
|
@@ -80,7 +86,7 @@ module CalendarDateSelect
|
|
80
86
|
# (e.g. CalendarDateSelect.format = :italian)
|
81
87
|
def self.format=(format)
|
82
88
|
raise "CalendarDateSelect: Unrecognized format specification: #{format}" unless FORMATS.has_key?(format)
|
83
|
-
@
|
89
|
+
@calendar_date_select_format = FORMATS[format]
|
84
90
|
end
|
85
91
|
|
86
92
|
def self.date_format_string(time = false)
|
@@ -86,7 +86,7 @@ module CalendarDateSelect::FormHelpers
|
|
86
86
|
# :before_close => "log('Calendar closing');" ,
|
87
87
|
# :after_close => "log('Calendar closed');",
|
88
88
|
# :after_navigate => "log('Current month is ' + (param.getMonth()+1) + '/' + (param.getFullYear()));",
|
89
|
-
# :onchange => "log('value changed to - ' + $F(this));"
|
89
|
+
# :onchange => "log('value changed to - ' + $F(this));" %>
|
90
90
|
#
|
91
91
|
# }}}
|
92
92
|
#
|
@@ -116,7 +116,7 @@ module CalendarDateSelect::FormHelpers
|
|
116
116
|
obj = options[:object] || instance_variable_get("@#{object}")
|
117
117
|
|
118
118
|
if !options.include?(:time) && obj.class.respond_to?("columns_hash")
|
119
|
-
column_type =
|
119
|
+
column_type = obj.class.columns_hash[method.to_s].type if obj.class.columns_hash.include?(method.to_s)
|
120
120
|
options[:time] = true if column_type == :datetime
|
121
121
|
end
|
122
122
|
|
@@ -136,7 +136,11 @@ module CalendarDateSelect::FormHelpers
|
|
136
136
|
elsif obj.respond_to?(method)
|
137
137
|
obj.send(method).to_s
|
138
138
|
else
|
139
|
-
|
139
|
+
begin
|
140
|
+
obj.send(method).strftime(CalendarDateSelect.date_format_string(use_time))
|
141
|
+
rescue
|
142
|
+
nil
|
143
|
+
end
|
140
144
|
end
|
141
145
|
|
142
146
|
tag = ActionView::Helpers::InstanceTag.new_with_backwards_compatibility(object, method, self, options.delete(:object))
|
@@ -154,10 +158,18 @@ module CalendarDateSelect::FormHelpers
|
|
154
158
|
options, javascript_options = CalendarDateSelect.default_options.merge(options), {}
|
155
159
|
image = options.delete(:image)
|
156
160
|
callbacks = [:before_show, :before_close, :after_show, :after_close, :after_navigate]
|
157
|
-
for key in [:time, :valid_date_check, :embedded, :buttons, :clear_button, :format, :year_range, :month_year, :popup, :hidden, :minute_interval] + callbacks
|
161
|
+
for key in [:default_time, :time, :valid_date_check, :embedded, :buttons, :clear_button, :format, :year_range, :month_year, :popup, :hidden, :minute_interval] + callbacks
|
158
162
|
javascript_options[key] = options.delete(key) if options.has_key?(key)
|
159
163
|
end
|
160
164
|
|
165
|
+
if (default_time = javascript_options[:default_time])
|
166
|
+
if default_time.respond_to?(:strftime)
|
167
|
+
javascript_options[:default_time] = "new Date('#{default_time.strftime(CalendarDateSelect.date_format_string(true))}')"
|
168
|
+
else
|
169
|
+
javascript_options[:default_time] = "function() { return #{default_time} }"
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
161
173
|
# if passing in mixed, pad it with single quotes
|
162
174
|
javascript_options[:time] = "'mixed'" if javascript_options[:time].to_s=="mixed"
|
163
175
|
javascript_options[:month_year] = "'#{javascript_options[:month_year]}'" if javascript_options[:month_year]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
// CalendarDateSelect version 1.
|
1
|
+
// CalendarDateSelect version 1.16 - a prototype based date picker
|
2
2
|
// Questions, comments, bugs? - see the project page: http://code.google.com/p/calendardateselect
|
3
3
|
if (typeof Prototype == 'undefined') alert("CalendarDateSelect Error: Prototype could not be found. Please make sure that your application's layout includes prototype.js (.g. <%= javascript_include_tag :defaults %>) *before* it includes calendar_date_select.js (.g. <%= calendar_date_select_includes %>).");
|
4
4
|
if (Prototype.Version < "1.6") alert("Prototype 1.6.0 is required. If using earlier version of prototype, please use calendar_date_select version 1.8.3");
|
@@ -333,9 +333,14 @@ CalendarDateSelect.prototype = {
|
|
333
333
|
parseDate: function()
|
334
334
|
{
|
335
335
|
var value = $F(this.target_element).strip()
|
336
|
-
|
336
|
+
var default_time = this.options.get("default_time");
|
337
|
+
this.selection_made = (value != "" || default_time);
|
337
338
|
this.date = value=="" ? NaN : Date.parseFormattedString(this.options.get("date") || value);
|
338
|
-
if (isNaN(this.date)
|
339
|
+
if (isNaN(this.date) && !default_time)
|
340
|
+
this.date = new Date();
|
341
|
+
else if (isNaN(this.date) && default_time)
|
342
|
+
this.date = (Object.prototype.toString.apply(default_time) === '[object Function]') ? default_time() : default_time;
|
343
|
+
|
339
344
|
if (!this.validYear(this.date.getFullYear())) this.date.setYear( (this.date.getFullYear() < this.yearRange().start) ? this.yearRange().start : this.yearRange().end);
|
340
345
|
this.selected_date = new Date(this.date);
|
341
346
|
this.use_time = /[0-9]:[0-9]{2}/.exec(value) ? true : false;
|
@@ -355,9 +360,9 @@ CalendarDateSelect.prototype = {
|
|
355
360
|
if ((this.target_element.disabled || this.target_element.readOnly) && this.options.get("popup") != "force") return false;
|
356
361
|
if (parts.get("day")) {
|
357
362
|
var t_selected_date = this.selected_date, vdc = this.options.get("valid_date_check");
|
358
|
-
for (var x = 0; x<=3; x++) t_selected_date.setDate(parts.get("day"));
|
359
363
|
t_selected_date.setYear(parts.get("year"));
|
360
364
|
t_selected_date.setMonth(parts.get("month"));
|
365
|
+
t_selected_date.setDate(parts.get("day"));
|
361
366
|
|
362
367
|
if (vdc && ! vdc(t_selected_date.stripTime())) { return false; }
|
363
368
|
this.selected_date = t_selected_date;
|
@@ -16,6 +16,7 @@ Date.parseFormattedString = function (string) {
|
|
16
16
|
// 1/1/1111 01:11pm
|
17
17
|
// 1/1/1111 1:11pm
|
18
18
|
var regexp = "(([0-1]?[0-9])\/[0-3]?[0-9]\/[0-9]{4}) *([0-9]{1,2}(:[0-9]{2})? *(am|pm))?";
|
19
|
+
string = string.strip();
|
19
20
|
var d = string.match(new RegExp(regexp, "i"));
|
20
21
|
if (d==null) {
|
21
22
|
return Date.parse(string); // Give javascript a chance to parse it.
|
@@ -24,7 +25,7 @@ Date.parseFormattedString = function (string) {
|
|
24
25
|
mdy = d[1].split('/');
|
25
26
|
hrs = 0;
|
26
27
|
mts = 0;
|
27
|
-
if(d[3] != null) {
|
28
|
+
if(d[3] != null && d[3].strip() != "") {
|
28
29
|
hrs = parseInt(d[3].split('')[0], 10);
|
29
30
|
if(d[5].toLowerCase() == 'pm') { hrs += 12; } // Add 12 more to hrs
|
30
31
|
mts = d[4].split(':')[1];
|
@@ -0,0 +1,31 @@
|
|
1
|
+
// Formats date and time as "2000/01/20 17:00"
|
2
|
+
Date.prototype.toFormattedString = function(include_time){
|
3
|
+
str = Date.padded2(this.getDate()) + "/" + Date.padded2(this.getMonth() + 1) + "/" + this.getFullYear();
|
4
|
+
|
5
|
+
if (include_time) {
|
6
|
+
str += " " + this.getHours() + ":" + this.getPaddedMinutes();
|
7
|
+
}
|
8
|
+
return str;
|
9
|
+
}
|
10
|
+
|
11
|
+
// Parses date and time as "2000/01/20 17:00"
|
12
|
+
Date.parseFormattedString = function(string) {
|
13
|
+
var regexp = "([0-9]{2})/([0-9]{2})/([0-9]{4})" +
|
14
|
+
"( ([0-9]{1,2}):([0-9]{2})(:([0-9]{2})(.([0-9]{3}))?)?" +
|
15
|
+
")?";
|
16
|
+
var d = string.match(new RegExp(regexp, "i"));
|
17
|
+
if (d==null) return Date.parse(string); // at least give javascript a crack at it.
|
18
|
+
var offset = 0;
|
19
|
+
var date = new Date(d[3], 0, 1);
|
20
|
+
if (d[2]) { date.setMonth(d[2] - 1); }
|
21
|
+
if (d[1]) { date.setDate(d[1]); }
|
22
|
+
if (d[4]) {
|
23
|
+
hours = parseInt(d[5], 10);
|
24
|
+
date.setHours(hours);
|
25
|
+
}
|
26
|
+
if (d[6]) { date.setMinutes(d[6]); }
|
27
|
+
//if (d[8]) { date.setSeconds(d[7]); }
|
28
|
+
//if (d[9]) { date.setMiliseconds(Number("0." + d[8]) * 1000); }
|
29
|
+
|
30
|
+
return date;
|
31
|
+
}
|
@@ -1,46 +1,29 @@
|
|
1
|
+
// International date format (ISO 8601): yyyy-mm-dd
|
2
|
+
// Including time (no seconds): yyyy-mm-dd HH:MM
|
1
3
|
Date.prototype.toFormattedString = function(include_time) {
|
2
|
-
|
4
|
+
var hour;
|
3
5
|
var str = this.getFullYear() + "-" + Date.padded2(this.getMonth() + 1) + "-" +Date.padded2(this.getDate());
|
4
6
|
if (include_time) {
|
5
|
-
hour = this.getHours();
|
6
|
-
str += " " +
|
7
|
+
hour = Date.padded2(this.getHours());
|
8
|
+
str += " " + hour + ":" + this.getPaddedMinutes();
|
7
9
|
}
|
8
10
|
return str;
|
9
11
|
};
|
10
12
|
|
13
|
+
// TODO: take care of timezone offsets
|
14
|
+
// as the timezone is not displayed in the input,
|
15
|
+
// this could be tricky (or just unnessesary)
|
11
16
|
Date.parseFormattedString = function (string) {
|
17
|
+
var regexp = "([0-9]{4})(-([0-9]{2})(-([0-9]{2})" +
|
18
|
+
"([T| ]([0-9]{2}):([0-9]{2})(:([0-9]{2})(\.([0-9]+))?)?" +
|
19
|
+
"(Z|(([-+])([0-9]{2}):([0-9]{2})))?)?)?)?";
|
20
|
+
var d = string.match(new RegExp(regexp));
|
12
21
|
|
13
|
-
|
14
|
-
"( ([0-9]{1,2}):([0-9]{2})?" +
|
15
|
-
"?)?)?)?";
|
22
|
+
var date = new Date(d[1], 0, 1);
|
16
23
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
if (d[3]) {
|
24
|
-
date.setMonth(d[3] - 1);
|
25
|
-
}
|
26
|
-
if (d[5]) {
|
27
|
-
date.setDate(d[5]);
|
28
|
-
}
|
29
|
-
if (d[7]) {
|
30
|
-
date.setHours(d[7]);
|
31
|
-
}
|
32
|
-
if (d[8]) {
|
33
|
-
date.setMinutes(d[8]);
|
34
|
-
}
|
35
|
-
if (d[0]) {
|
36
|
-
date.setSeconds(d[0]);
|
37
|
-
}
|
38
|
-
if (d[2]) {
|
39
|
-
date.setMilliseconds(Number("0." + d[2]));
|
40
|
-
}
|
41
|
-
if (d[4]) {
|
42
|
-
offset = (Number(d[6])) + Number(d[8]);
|
43
|
-
offset = ((d[5] == '-') ? 1 : -1);
|
44
|
-
}
|
45
|
-
return date;
|
46
|
-
};
|
24
|
+
if (d[3]) { date.setMonth(d[3] - 1); }
|
25
|
+
if (d[5]) { date.setDate(d[5]); }
|
26
|
+
if (d[7]) { date.setHours(d[7]); }
|
27
|
+
if (d[8]) { date.setMinutes(d[8]); }
|
28
|
+
return date;
|
29
|
+
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Date.weekdays = ['سبت', 'أحد', 'إثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة'];
|
2
|
+
Date.months = ['كانون ثاني', 'شباط', 'آذار', 'نيسان', 'أيار', 'حزيران', 'تموز', 'آب', 'أيلول', 'تشرين أول', 'تشرين ثاني', 'كانون أول'];
|
3
|
+
Date.first_day_of_week = 6;
|
4
|
+
|
5
|
+
_translations = {
|
6
|
+
"OK": "نفذ",
|
7
|
+
"Now": "الآن",
|
8
|
+
"Today": "اليوم",
|
9
|
+
"Clear": "إلغاء"
|
10
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Date.weekdays = $w('Ma Ti On To Fr Lø Sø');
|
2
|
+
Date.months = $w('Januar Februar Marts April Maj Juni Juli August September Oktober November December');
|
3
|
+
|
4
|
+
Date.first_day_of_week = 1;
|
5
|
+
|
6
|
+
_translations = {
|
7
|
+
"OK": "Vælg",
|
8
|
+
"Now": "Nu",
|
9
|
+
"Today": "I dag",
|
10
|
+
"Clear": "Slet"
|
11
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Date.weekdays = $w("L M X J V S D");
|
2
|
+
Date.months = $w("Enero Febrero Marzo Abril Mayo Junio Julio Agosto Septiembre Octubre Noviembre Diciembre" );
|
3
|
+
|
4
|
+
Date.first_day_of_week = 1;
|
5
|
+
|
6
|
+
_translations = {
|
7
|
+
"OK": "Cancelar",
|
8
|
+
"Now": "Ahora",
|
9
|
+
"Clear": "Limpiar",
|
10
|
+
"Today": "Hoy"
|
11
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Date.weekdays = $w('Lu Ma Me Gi Ve Sa Do');
|
2
|
+
Date.months = $w('Gennaio Febbraio Marzo Aprile Maggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre');
|
3
|
+
Date.first_day_of_week = 1;
|
4
|
+
_translations = {
|
5
|
+
"OK": "OK",
|
6
|
+
"Now": "Ora",
|
7
|
+
"Today": "Oggi",
|
8
|
+
"Clear": "Cancella"
|
9
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Date.weekdays = $w('Ma Di Wo Do Vr Za Zo');
|
2
|
+
Date.months = $w('januari februari maart april mei juni juli augustus september oktober november december');
|
3
|
+
|
4
|
+
Date.first_day_of_week = 1;
|
5
|
+
|
6
|
+
_translations = {
|
7
|
+
"OK": "OK",
|
8
|
+
"Now": "Nu",
|
9
|
+
"Today": "Vandaag",
|
10
|
+
"Clear": "Wissen"
|
11
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
Date.weekdays = $w('Po To Sr Če Pe So Ne');
|
2
|
+
Date.months = $w('Januar Februar Marec April Maj Junij Julij Avgust September Oktober November December');
|
3
|
+
|
4
|
+
Date.first_day_of_week = 1;
|
5
|
+
|
6
|
+
_translations = {
|
7
|
+
"OK": "OK",
|
8
|
+
"Now": "Trenutno",
|
9
|
+
"Today": "Danes",
|
10
|
+
"Clear": "Pobriši"
|
11
|
+
}
|
@@ -0,0 +1,142 @@
|
|
1
|
+
.calendar_date_select {
|
2
|
+
color:white;
|
3
|
+
border:#002b7f 1px solid;
|
4
|
+
display:block;
|
5
|
+
width:195px;
|
6
|
+
z-index: 1000;
|
7
|
+
}
|
8
|
+
/* this is a fun ie6 hack to get drop downs to stay behind the popup window. This should always be just underneath .calendar_date_select */
|
9
|
+
iframe.ie6_blocker {
|
10
|
+
position: absolute;
|
11
|
+
z-index: 999;
|
12
|
+
}
|
13
|
+
|
14
|
+
.calendar_date_select thead th {
|
15
|
+
font-weight:bold;
|
16
|
+
background-color: #56aa1c;
|
17
|
+
border-bottom:2px solid #002b7f;
|
18
|
+
color: #002b7f !important;
|
19
|
+
}
|
20
|
+
|
21
|
+
.calendar_date_select .cds_buttons {
|
22
|
+
text-align:center;
|
23
|
+
padding:5px 0px;
|
24
|
+
background-color: #56aa1c;
|
25
|
+
}
|
26
|
+
|
27
|
+
.calendar_date_select .cds_footer {
|
28
|
+
font-weight: bold;
|
29
|
+
background-color: #002b7f;
|
30
|
+
padding:3px;
|
31
|
+
text-align:center;
|
32
|
+
}
|
33
|
+
|
34
|
+
.calendar_date_select table {
|
35
|
+
margin: 0px;
|
36
|
+
padding: 0px;
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
.calendar_date_select .cds_header {
|
41
|
+
background-color: #ccc;
|
42
|
+
border-bottom: 2px solid #002b7f;
|
43
|
+
text-align:center;
|
44
|
+
}
|
45
|
+
|
46
|
+
.calendar_date_select .cds_header span {
|
47
|
+
font-size:15px;
|
48
|
+
color: black;
|
49
|
+
font-weight: bold;
|
50
|
+
}
|
51
|
+
|
52
|
+
.calendar_date_select select { font-size:11px;}
|
53
|
+
|
54
|
+
.calendar_date_select .cds_header a:hover {
|
55
|
+
color: white;
|
56
|
+
}
|
57
|
+
.calendar_date_select .cds_header a {
|
58
|
+
width:22px;
|
59
|
+
height:20px;
|
60
|
+
text-decoration: none;
|
61
|
+
font-size:14px;
|
62
|
+
color:black !important;
|
63
|
+
}
|
64
|
+
|
65
|
+
.calendar_date_select .cds_header a.prev {
|
66
|
+
float:left;
|
67
|
+
}
|
68
|
+
.calendar_date_select .cds_header a.next {
|
69
|
+
float:right;
|
70
|
+
}
|
71
|
+
|
72
|
+
.calendar_date_select .cds_header a.close {
|
73
|
+
float:right;
|
74
|
+
display:none;
|
75
|
+
}
|
76
|
+
|
77
|
+
.calendar_date_select .cds_header select.month {
|
78
|
+
width:90px;
|
79
|
+
}
|
80
|
+
|
81
|
+
.calendar_date_select .cds_header select.year {
|
82
|
+
width:61px;
|
83
|
+
}
|
84
|
+
|
85
|
+
.calendar_date_select .cds_buttons a:hover {
|
86
|
+
color: white !important;
|
87
|
+
}
|
88
|
+
|
89
|
+
.calendar_date_select .cds_buttons a {
|
90
|
+
font-weight:bold;
|
91
|
+
color: #c4ba00 !important;
|
92
|
+
font-size: 12px;
|
93
|
+
}
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
.calendar_date_select td {
|
98
|
+
background-color: #56aa1c;
|
99
|
+
font-size:12px;
|
100
|
+
width: 24px;
|
101
|
+
height: 21px;
|
102
|
+
text-align:center;
|
103
|
+
vertical-align: middle;
|
104
|
+
}
|
105
|
+
.calendar_date_select td.weekend {
|
106
|
+
background-color: #56aa1c;
|
107
|
+
}
|
108
|
+
|
109
|
+
.calendar_date_select td div {
|
110
|
+
color:#002b7f;
|
111
|
+
}
|
112
|
+
.calendar_date_select td div.other {
|
113
|
+
color: #c4ba00;
|
114
|
+
}
|
115
|
+
.calendar_date_select td.selected div {
|
116
|
+
color:black;
|
117
|
+
}
|
118
|
+
|
119
|
+
|
120
|
+
.calendar_date_select tbody td {
|
121
|
+
border-bottom: 1px solid #002b7f;
|
122
|
+
}
|
123
|
+
.calendar_date_select tbody td.selected {
|
124
|
+
background-color:white;
|
125
|
+
color:black;
|
126
|
+
}
|
127
|
+
|
128
|
+
.calendar_date_select tbody td:hover {
|
129
|
+
background-color:#ccc;
|
130
|
+
}
|
131
|
+
|
132
|
+
.calendar_date_select tbody td.today {
|
133
|
+
border: 1px dashed #002b7f;
|
134
|
+
}
|
135
|
+
|
136
|
+
.calendar_date_select td.disabled div {
|
137
|
+
color: #440000;
|
138
|
+
}
|
139
|
+
|
140
|
+
.fieldWithErrors .calendar_date_select {
|
141
|
+
border: 2px solid #002b7f;
|
142
|
+
}
|