Popup calendar.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-10-13 16:38:07 +03:00
parent c9ff24dd79
commit 6ec1826fbd
2 changed files with 15 additions and 7 deletions

View File

@ -637,6 +637,19 @@
<property name="displayFormat">
<string>yyyy-MM-dd</string>
</property>
<property name="calendarPopup">
<bool>true</bool>
</property>
<property name="currentSectionIndex">
<number>0</number>
</property>
<property name="date">
<date>
<year>1800</year>
<month>1</month>
<day>1</day>
</date>
</property>
</widget>
</item>
<item row="7" column="0">

View File

@ -365,8 +365,7 @@ void VMeasurements::SetGivenName(const QString &text)
//---------------------------------------------------------------------------------------------------------------------
QDate VMeasurements::BirthDate() const
{
const QString date = UniqueTagText(TagBirthDate, "1990-02-15");
return QDate::fromString(date, "yyyy-MM-dd");
return QDate::fromString(UniqueTagText(TagBirthDate), "yyyy-MM-dd");
}
//---------------------------------------------------------------------------------------------------------------------
@ -699,11 +698,7 @@ void VMeasurements::CreateEmptyIndividualFile(Unit unit)
QDomElement personal = createElement(TagPersonal);
personal.appendChild(createElement(TagFamilyName));
personal.appendChild(createElement(TagGivenName));
QDomElement date = createElement(TagBirthDate);
const QDomText newDate = createTextNode(QDate(1990, 02, 15).toString("yyyy-MM-dd"));
date.appendChild(newDate);
personal.appendChild(date);
personal.appendChild(createElement(TagBirthDate));
QDomElement gender = createElement(TagGender);
gender.appendChild(createTextNode(GenderToStr(GenderType::Unknown)));