com.jwebmp.plugins.bs4datetimedropdown.BSDateTimeInput Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jwebmp-bootstrap-date-time-picker Show documentation
Show all versions of jwebmp-bootstrap-date-time-picker Show documentation
The JWebSwing implementation for Bootstrap Date Time Picker
/*
* Copyright (C) 2017 GedMarc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package com.jwebmp.plugins.bs4datetimedropdown;
import com.jwebmp.core.base.angular.AngularPageConfigurator;
import com.jwebmp.core.plugins.ComponentInformation;
import com.jwebmp.plugins.bootstrap.forms.controls.BSInput;
/**
* @param
*
* @author GedMarc
* @since 27 Jan 2017
*/
@ComponentInformation(name = "Bootstrap DateTime Input",
description = "Allows user input of a date/time value. Valid dates are displayed in specified format, but input may be in any supported format. ",
url = "https://github.com/dalelotts/angular-date-time-input",
wikiUrl = "https://github.com/GedMarc/JWebMP-BSDateTimePickerPlugin/wiki")
public class BSDateTimeInput
extends BSInput
{
/**
* The default date time input with the given display format (required)
*
* @param dateDisplayFormat
* @param variableName
*/
public BSDateTimeInput(String dateDisplayFormat, String variableName)
{
addAttribute(BSDateTimeInputAttributes.Date_Time_Input, dateDisplayFormat);
AngularPageConfigurator.setRequired(true);
bind(variableName);
}
/**
* Sets the display form of this input
*
* @param dateDisplayFormat
*
* @return
*/
public J setDisplayForm(String dateDisplayFormat)
{
addAttribute(BSDateTimeInputAttributes.Date_Time_Input, dateDisplayFormat);
return (J) this;
}
}