mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-26 20:02:27 +03:00
web: leave date field blank, avoid problems (#322)
This commit is contained in:
parent
7ec3ebb66b
commit
3739f0e364
@ -339,7 +339,7 @@ addform _ vd@VD{..} = [hamlet|
|
||||
<table style="width:100%;">
|
||||
<tr#descriptionrow>
|
||||
<td>
|
||||
<input #date .typeahead .form-control .input-lg type=text size=15 name=date placeholder="Date" value=#{defdate}>
|
||||
<input #date .typeahead .form-control .input-lg type=text size=15 name=date placeholder="Date" value="#{defdate}">
|
||||
<td>
|
||||
<input #description .typeahead .form-control .input-lg type=text size=40 name=description placeholder="Description">
|
||||
$forall n <- postingnums
|
||||
@ -351,7 +351,7 @@ addform _ vd@VD{..} = [hamlet|
|
||||
(or ctrl +, ctrl -)
|
||||
|]
|
||||
where
|
||||
defdate = "today" :: String
|
||||
defdate = "" :: String -- #322 don't set a default, typeahead(?) clears it on tab. See also hledger.js
|
||||
dates = ["today","yesterday","tomorrow"] :: [String]
|
||||
descriptions = sort $ nub $ map tdescription $ jtxns j
|
||||
accts = sort $ journalAccountNamesUsed j
|
||||
|
@ -136,7 +136,7 @@ function addformReset(showmsg) {
|
||||
// reset typehead state (though not fetched completions)
|
||||
$('.typeahead').typeahead('val', '');
|
||||
$('.tt-dropdown-menu').hide();
|
||||
$('input#date').val('today');
|
||||
$('input#date').val(''); // #322 don't set a default, typeahead(?) clears it on tab. See also Foundation.hs
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user