3 * Copyright(c) 2006-2010 Sencha Inc.
5 * http://www.sencha.com/license
8 * @class Ext.calendar.ReminderField
9 * @extends Ext.form.ComboBox
10 * <p>A custom combo used for choosing a reminder setting for an event.</p>
11 * <p>This is pretty much a standard combo that is simply pre-configured for the options needed by the
12 * calendar components. The default configs are as follows:<pre><code>
14 fieldLabel: 'Reminder',
22 * @param {Object} config The config object
24 Ext.calendar.ReminderField = Ext.extend(Ext.form.ComboBox, {
26 fieldLabel: 'Reminder',
34 initComponent: function() {
35 Ext.calendar.ReminderField.superclass.initComponent.call(this);
37 this.store = this.store || new Ext.data.ArrayStore({
38 fields: ['value', 'desc'],
42 ['0', 'At start time'],
43 ['5', '5 minutes before start'],
44 ['15', '15 minutes before start'],
45 ['30', '30 minutes before start'],
46 ['60', '1 hour before start'],
47 ['90', '1.5 hours before start'],
48 ['120', '2 hours before start'],
49 ['180', '3 hours before start'],
50 ['360', '6 hours before start'],
51 ['720', '12 hours before start'],
52 ['1440', '1 day before start'],
53 ['2880', '2 days before start'],
54 ['4320', '3 days before start'],
55 ['5760', '4 days before start'],
56 ['7200', '5 days before start'],
57 ['10080', '1 week before start'],
58 ['20160', '2 weeks before start']
64 initValue: function() {
65 if (this.value !== undefined) {
66 this.setValue(this.value);
71 this.originalValue = this.getValue();
75 Ext.reg('reminderfield', Ext.calendar.ReminderField);