Saves a datetime field text value.

@param fieldType  the field type
@param text  the text value
@param locale  the locale to use
196326
public void saveField(DateTimeFieldType fieldType, String text, Locale locale) {
        obtainSaveField().init(fieldType.getField(iChrono), text, locale);
    }
1146334
public static java.sql.Date convertDate(String date, Locale locale) {
        SimpleDateFormat df;
        java.util.Date dbDate = null;
        java.sql.Date sqldate = null;
        try {
            if (date == null || date.equals("")) {
                return null;
            }

            df = (SimpleDateFormat) DateFormat.getDateInstance(dateStyle, locale);

            SimpleDateFormat sdf = new SimpleDateFormat(df.toPattern());
            java.text.ParsePosition pos = new java.text.ParsePosition(0);
            sdf.setLenient(false);
            dbDate = sdf.parse(date, pos);
            return new java.sql.Date(dbDate.getTime());

        } catch (Exception e) {
            return null;
        }
    }
1160260
public Property property(DateTimeFieldType fieldType) {
        if (fieldType == null) {
            throw new IllegalArgumentException("The DateTimeFieldType must not be null");
        }
        if (isSupported(fieldType) == false) {
            throw new IllegalArgumentException("Field '" + fieldType + "' is not supported");
        }
        return new Property(this, fieldType.getField(getChronology()));
    }
274120
function(val, sendUpdatedEvt) {
      if(!lang.isObject(val)) {return;}
      var h = val.getHours();
      var m = val.getMinutes();
      var s = val.getSeconds();
      var time = ([(h < 10 ? '0':'')+h, (m < 10 ? '0':'')+m, (s < 10 ? '0':'')+s]).join(':');
      inputEx.DateTimeField.superclass.setValue.call(this, [val, time], sendUpdatedEvt);
   }
1036035
protected T parseString(final DateFormat formatter, final String text) throws ParseException {
        Date date = formatter.parse(text);
        return convertTypeValue(date);
    }
754768
private void assertValidDateFieldType(Optional<Field> field) {

		field.ifPresent(it -> {

			if (SUPPORTED_DATE_TYPES.contains(it.getType().getName())) {
				return;
			}

			Class<?> type = it.getType();

			if (Jsr310Converters.supports(type)
					|| ThreeTenBackPortConverters.supports(type)) {
				return;
			}

			throw new IllegalStateException(String.format(
					"Found created/modified date field with type %s but only %s as well as java.time types are supported!",
					type, SUPPORTED_DATE_TYPES));
		});
	}
224058
public void setTime(Date time)
    {
        String timeString = "";
        if (time != null)
    		timeString = timeFormat.format(time);
        jTextField3.setText(timeString);
        jTimeButton1.setTargetDate(time);
    }
512686
private static void addTranslation(String text, int type) {
        TEXTS.put(type, text);
        LOOKUP.put(text, type);
    }
428280
private Timestamp convertFieldValueToTimestamp(final Field field,
                                                   final ExportContainer exportContainer) {
        if (field.getType().equals(LocalDateTime.class)) {
            return convertToTimestamp(parseDateTime(exportContainer.getExportValue()));
        } else if (field.getType().equals(LocalDate.class)) {
            return convertToTimestamp(parseDate(exportContainer.getExportValue()));
        } else if (field.getType().equals(LocalTime.class)) {
            return convertToTimestamp(parseTime(exportContainer.getExportValue()));
        } else if (field.getType().equals(Date.class)) {
            return convertToTimestamp(parseSimpleDateLong(exportContainer.getExportValue()));
        } else if (field.getType().equals(Timestamp.class)) {
            return Timestamp.valueOf(exportContainer.getExportValue());
        }
        return null;
    }
16008
void setLanguage(final Locale locale) {

        if (!m_languageSelect.getValue().equals(locale)) {
            m_languageSelect.setValue(locale);
        }
    }
44685
private static void checkPreconditions(final String dateFormat, final Locale locale) {
		if( dateFormat == null ) {
			throw new NullPointerException("dateFormat should not be null");
		} else if( locale == null ) {
			throw new NullPointerException("locale should not be null");
		}
	}
533852
public void setDate(String dateString)
    {
		Date date = null;
		try	{
            if ((dateString != null) && (dateString.length() > 0))
                date = dateFormat.parse(dateString);
		} catch (Exception e)	{
            date = null;
		}
        this.setDate(date);
    }
1316093
@OptionDesc(longName = "locale", shortName = "l",
			description = "citation LOCALE (default: en-US)",
			argumentName = "LOCALE", argumentType = ArgumentType.STRING,
			priority = 30)
	public void setLocale(String locale) {
		this.locale = locale;
	}
151268
public void registerFieldFormatter(final String field, final Class<?> fieldType, final FieldFormatter<?> formatter) {
        
        registerFieldFormatter(field, fieldType, formatter, false);
        
    }
268326
@Override
    public void setValue(Object value) {
        if (value != null) {
            Calendar c = (Calendar) value;
            ((JTextField) editor).setText(DEFAULT_DATE_FORMAT.format(c.getTime()));
        }
    }
967032
public void setDateTime(Date dateTime)
    {
        String dateTimeString = "";
        if (dateTime != null)
    		dateTimeString = dateTimeFormat.format(dateTime);
        jTextField4.setText(dateTimeString);
        jCalendarButton2.setTargetDate(dateTime);
        jTimeButton2.setTargetDate(dateTime);
    }
122648
public static void setField(Object instance, Class<?> type, String fieldName, Object fieldValue) {
		try {
			final Field field = type.getDeclaredField(fieldName);
			field.setAccessible(true);
			field.set(instance, fieldValue);
		} catch (Exception exception) {
			throw new Error(exception);
		}
	}