#ifndef MonthInputType_h
#define MonthInputType_h
#include "core/html/forms/BaseChooserOnlyDateAndTimeInputType.h"
#include "core/html/forms/BaseMultipleFieldsDateAndTimeInputType.h"
namespace WebCore {
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
typedef BaseMultipleFieldsDateAndTimeInputType BaseMonthInputType;
#else
typedef BaseChooserOnlyDateAndTimeInputType BaseMonthInputType;
#endif
class MonthInputType FINAL : public BaseMonthInputType {
public:
static PassRefPtr<InputType> create(HTMLInputElement&);
private:
MonthInputType(HTMLInputElement& element) : BaseMonthInputType(element) { }
virtual void countUsage() OVERRIDE;
virtual const AtomicString& formControlType() const OVERRIDE;
virtual double valueAsDate() const OVERRIDE;
virtual String serializeWithMilliseconds(double) const OVERRIDE;
virtual Decimal parseToNumber(const String&, const Decimal&) const OVERRIDE;
virtual Decimal defaultValueForStepUp() const OVERRIDE;
virtual StepRange createStepRange(AnyStepHandling) const OVERRIDE;
virtual bool parseToDateComponentsInternal(const String&, DateComponents*) const OVERRIDE;
virtual bool setMillisecondToDateComponents(double, DateComponents*) const OVERRIDE;
virtual bool isMonthField() const OVERRIDE;
virtual bool canSetSuggestedValue() OVERRIDE;
#if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
virtual String formatDateTimeFieldsState(const DateTimeFieldsState&) const OVERRIDE;
virtual void setupLayoutParameters(DateTimeEditElement::LayoutParameters&, const DateComponents&) const OVERRIDE;
virtual bool isValidFormat(bool hasYear, bool hasMonth, bool hasWeek, bool hasDay, bool hasAMPM, bool hasHour, bool hasMinute, bool hasSecond) const OVERRIDE;
#endif
};
}
#endif