Set Date-Picker as the end-date of a date-range.

        Args:
            - event_id (string): User-defined unique id for linking two fields
            - import_options (bool): inherit options from start-date input,
              default: TRUE
499717
def end_of(self, event_id, import_options=True):
        
        event_id = str(event_id)
        if event_id in DatePickerDictionary.items:
            linked_picker = DatePickerDictionary.items[event_id]
            self.config['linked_to'] = linked_picker.config['id']
            if import_options:
                backup_moment_format = self.config['options']['format']
                self.config['options'].update(linked_picker.config['options'])
                self.config['options'].update(self.options_param)
                if self.format_param or 'format' in self.options_param:
                    self.config['options']['format'] = backup_moment_format
                else:
                    self.format = linked_picker.format
            # Setting useCurrent is necessary, see following issue
            # https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1075
            self.config['options']['useCurrent'] = False
            self._link_to(linked_picker)
        else:
            raise KeyError(
                'start-date not specified for event_id "%s"' % event_id)
        return self
750508
function(options) {
      inputEx.DatePickerField.superclass.setOptions.call(this, options);
      
      // Overwrite default options
      this.options.className = options.className ? options.className : 'inputEx-Field inputEx-DateField inputEx-PickerField inputEx-DatePickerField';

      this.options.readonly = YAHOO.lang.isUndefined(options.readonly) ? true : options.readonly;
      
      // Added options
      this.options.calendar = options.calendar || inputEx.messages.defautCalendarOpts;
   }
306553
@UiHandler("m_dateCreatedEndDateBox")
    protected void onDateCreatedEndChange(ValueChangeEvent<Date> event) {

        if (event.getValue() != null) {
            m_tabHandler.setDateCreatedEnd(event.getValue().getTime());
        } else {
            // if the field is empty take the max value
            m_tabHandler.setDateCreatedEnd(-1L);
        }
    }
688334
def semantic_date_range_tag(date_from, date_to, options = {})
      SemanticDateTimeTags::Tag::DateRange.new(date_from, date_to, options).to_html
    end
1345841
def update_calendar_event(self, id, calendar_event_child_event_data_X_context_code=None, calendar_event_child_event_data_X_end_at=None, calendar_event_child_event_data_X_start_at=None, calendar_event_context_code=None, calendar_event_description=None, calendar_event_end_at=None, calendar_event_location_address=None, calendar_event_location_name=None, calendar_event_start_at=None, calendar_event_time_zone_edited=None, calendar_event_title=None):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - id
        """ID"""
        path["id"] = id

        # OPTIONAL - calendar_event[context_code]
        """Context code of the course/group/user to move this event to.
        Scheduler appointments and events with section-specific times cannot be moved between calendars."""
        if calendar_event_context_code is not None:
            data["calendar_event[context_code]"] = calendar_event_context_code

        # OPTIONAL - calendar_event[title]
        """Short title for the calendar event."""
        if calendar_event_title is not None:
            data["calendar_event[title]"] = calendar_event_title

        # OPTIONAL - calendar_event[description]
        """Longer HTML description of the event."""
        if calendar_event_description is not None:
            data["calendar_event[description]"] = calendar_event_description

        # OPTIONAL - calendar_event[start_at]
        """Start date/time of the event."""
        if calendar_event_start_at is not None:
            data["calendar_event[start_at]"] = calendar_event_start_at

        # OPTIONAL - calendar_event[end_at]
        """End date/time of the event."""
        if calendar_event_end_at is not None:
            data["calendar_event[end_at]"] = calendar_event_end_at

        # OPTIONAL - calendar_event[location_name]
        """Location name of the event."""
        if calendar_event_location_name is not None:
            data["calendar_event[location_name]"] = calendar_event_location_name

        # OPTIONAL - calendar_event[location_address]
        """Location address"""
        if calendar_event_location_address is not None:
            data["calendar_event[location_address]"] = calendar_event_location_address

        # OPTIONAL - calendar_event[time_zone_edited]
        """Time zone of the user editing the event. Allowed time zones are
        {http://www.iana.org/time-zones IANA time zones} or friendlier
        {http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html Ruby on Rails time zones}."""
        if calendar_event_time_zone_edited is not None:
            data["calendar_event[time_zone_edited]"] = calendar_event_time_zone_edited

        # OPTIONAL - calendar_event[child_event_data][X][start_at]
        """Section-level start time(s) if this is a course event. X can be any
        identifier, provided that it is consistent across the start_at, end_at
        and context_code"""
        if calendar_event_child_event_data_X_start_at is not None:
            data["calendar_event[child_event_data][X][start_at]"] = calendar_event_child_event_data_X_start_at

        # OPTIONAL - calendar_event[child_event_data][X][end_at]
        """Section-level end time(s) if this is a course event."""
        if calendar_event_child_event_data_X_end_at is not None:
            data["calendar_event[child_event_data][X][end_at]"] = calendar_event_child_event_data_X_end_at

        # OPTIONAL - calendar_event[child_event_data][X][context_code]
        """Context code(s) corresponding to the section-level start and end time(s)."""
        if calendar_event_child_event_data_X_context_code is not None:
            data["calendar_event[child_event_data][X][context_code]"] = calendar_event_child_event_data_X_context_code

        self.logger.debug("PUT /api/v1/calendar_events/{id} with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("PUT", "/api/v1/calendar_events/{id}".format(**path), data=data, params=params, no_data=True)
1295177
def reports(from_id, start_date = nil, end_date = nil)
      params = []

      if from_id
        params << "from_id=#{from_id}"
      end

      if start_date and not end_date
        raise 'must include both start_date and end_date'
      end
      if end_date and not start_date
        raise 'must include both start_date and end_date'
      end

      if start_date and end_date
        params << "start_date=#{start_date.strftime('%FT%T.%L%z')}"
        params << "end_date=#{end_date.strftime('%FT%T.%L%z')}"
      end

      query = "#{@endpoint}?"

      if params.size > 0
        query << params.join('&')
      end

      get query
    end
686752
public void setFinish(int index, Date value)
   {
      set(selectField(AssignmentFieldLists.CUSTOM_FINISH, index), value);
   }
536331
def _link_to(self, linked_picker):
        """"""
        yformat = self.config['options']['format'].replace('-01-01', '-12-31')
        self.config['options']['format'] = yformat
931273
def get_event(self, param):
        

        if param is None:
            return None
        if isinstance(param, str):
            url = self.build_url(
                self._endpoints.get('get_event').format(id=self.calendar_id,
                                                        ide=param))
            params = None
            by_id = True
        else:
            url = self.build_url(
                self._endpoints.get('get_events').format(id=self.calendar_id))
            params = {'$top': 1}
            params.update(param.as_params())
            by_id = False

        response = self.con.get(url, params=params,
                                headers={'Prefer': 'outlook.timezone="UTC"'})
        if not response:
            return None

        if by_id:
            event = response.json()
        else:
            event = response.json().get('value', [])
            if event:
                event = event[0]
            else:
                return None
        return self.event_constructor(parent=self,
                                      **{self._cloud_data_key: event})
13699
def delete_calendar_event(self, calendar_id, event_id, params=None):
        
        for param in (calendar_id, event_id):
            if param in SKIP_IN_PATH:
                raise ValueError("Empty value passed for a required argument.")
        return self.transport.perform_request(
            "DELETE",
            _make_path("_ml", "calendars", calendar_id, "events", event_id),
            params=params,
        )
702430
function datepicker_bindHover( dpDiv ) {
        var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
        return dpDiv.on( "mouseout", selector, function() {
            $( this ).removeClass( "ui-state-hover" );
            if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
                $( this ).removeClass( "ui-datepicker-prev-hover" );
            }
            if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
                $( this ).removeClass( "ui-datepicker-next-hover" );
            }
        } )
            .on( "mouseover", selector, datepicker_handleMouseover );
    }
627424
function(event) {
		var date,
			inst = $.datepicker._getInst(event.target);

		if (inst.input.val() !== inst.lastVal) {
			try {
				date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
					(inst.input ? inst.input.val() : null),
					$.datepicker._getFormatConfig(inst));

				if (date) { // only if valid
					$.datepicker._setDateFromField(inst);
					$.datepicker._updateAlternate(inst);
					$.datepicker._updateDatepicker(inst);
				}
			}
			catch (err) {
			}
		}
		return true;
	}
721041
public void addDateCreatedEnd(long end) {

        m_searchObject.setDateCreatedEnd(end);
        m_searchObjectChanged = true;
        ValueChangeEvent.fire(this, m_searchObject);
    }
288378
def create_event_strips(strip_start, strip_end, events)
      # create an inital event strip, with a nil entry for every day of the displayed days
      event_strips = [[nil] * (strip_end - strip_start + 1)]
    
      events.each do |event|
        cur_date = event.start_at.to_date
        end_date = event.end_at.to_date
        cur_date, end_date = event.clip_range(strip_start, strip_end)
        start_range = (cur_date - strip_start).to_i
        end_range = (end_date - strip_start).to_i
      
        # make sure the event is within our viewing range
        if (start_range <= end_range) and (end_range >= 0) 
          range = start_range..end_range
          
          open_strip = space_in_current_strips?(event_strips, range)
          
          if open_strip.nil?
            # no strips open, make a new one
            new_strip = [nil] * (strip_end - strip_start + 1)
            range.each {|r| new_strip[r] = event}
            event_strips << new_strip
          else
            # found an open strip, add this event to it
            range.each {|r| open_strip[r] = event}
          end
        end
      end
      event_strips
    end
1152792
function(data, defer_sort) {
		var event_id = this._assignID(data);

		if (typeof(data.start_date) == 'undefined') {
		    throw new TL.Error("missing_start_date_err", event_id);
		} else {
			this._processDates(data);
			this._tidyFields(data);
		}

		this.events.push(data);
		this.event_dict[event_id] = data;

		if (!defer_sort) {
			TL.DateUtil.sortByDate(this.events);
		}
		return event_id;
	}
1274647
def find_or_create_event_by_id(id, &blk)      
      event = id ? find_event_by_id(id)[0] : nil

      if event
        setup_event(event, &blk)
      elsif id
        event = Event.new(id: id, new_event_with_id_specified: true)
        setup_event(event, &blk)
      else
        event = Event.new
        setup_event(event, &blk)
      end
    end
302272
def unobtrusive_date_picker(object_name, method, options = {}, html_options = {})
      ActionView::Helpers::InstanceTag.new(object_name, method, self, options.delete(:object)).to_datepicker_date_select_tag(options, html_options)
    end