mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-23 03:59:38 +00:00
Merge pull request #3535
1f8aa0d
History: change default dates of 'Date from' and 'Date to' DatePicker components (rating89us)
This commit is contained in:
commit
0bd4d731d2
1 changed files with 9 additions and 2 deletions
|
@ -1399,7 +1399,7 @@ Rectangle {
|
|||
}
|
||||
|
||||
if (typeof root.model !== 'undefined' && root.model != null) {
|
||||
toDatePicker.currentDate = root.model.transactionHistory.lastDateTime
|
||||
toDatePicker.currentDate = new Date(); //today
|
||||
}
|
||||
|
||||
// extract from model, create JS array of txs
|
||||
|
@ -1777,7 +1777,14 @@ Rectangle {
|
|||
root.model = appWindow.currentWallet.historyModel;
|
||||
root.model.sortRole = TransactionHistoryModel.TransactionBlockHeightRole
|
||||
root.model.sort(0, Qt.DescendingOrder);
|
||||
fromDatePicker.currentDate = model.transactionHistory.firstDateTime
|
||||
var count = root.model.rowCount()
|
||||
if (count > 0) {
|
||||
//date of the first transaction
|
||||
fromDatePicker.currentDate = root.model.data(root.model.index((count - 1), 0), TransactionHistoryModel.TransactionDateRole);
|
||||
} else {
|
||||
//date of monero birth (2014-04-18)
|
||||
fromDatePicker.currentDate = model.transactionHistory.firstDateTime
|
||||
}
|
||||
}
|
||||
|
||||
root.reset();
|
||||
|
|
Loading…
Reference in a new issue