From ee6f6a6a1cecb16937fc85e9eacb83395cea0c62 Mon Sep 17 00:00:00 2001 From: staronline1985 Date: Thu, 18 Oct 2018 00:03:14 +0530 Subject: [PATCH] problem:Amount textbox don't have maximum character limit solution : set maximum character length. --- imports/ui/pages/auctions/currencyAuction.js | 11 +++++++++++ .../ui/pages/auctions/currencyAuction.template.html | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/imports/ui/pages/auctions/currencyAuction.js b/imports/ui/pages/auctions/currencyAuction.js index f3c216a7..3629a03d 100644 --- a/imports/ui/pages/auctions/currencyAuction.js +++ b/imports/ui/pages/auctions/currencyAuction.js @@ -23,6 +23,17 @@ Template.currencyAuction.onCreated(function() { Meteor.setInterval(() => this.now.set(Date.now()), 250) // update the timer every 250ms for smooth drainage }) + + +Template.currencyAuction.onRendered(function(){ + const instance=Template.instance(); + Meteor.setTimeout(()=>{ + instance.$("#js-amount").on("input",function(){ + this.value=this.value.slice(0,this.maxLength); + }); + },10) +}) + Template.currencyAuction.helpers({ currencies: () => { let bids = Bids.find({ diff --git a/imports/ui/pages/auctions/currencyAuction.template.html b/imports/ui/pages/auctions/currencyAuction.template.html index 0987eaad..e0da1b22 100644 --- a/imports/ui/pages/auctions/currencyAuction.template.html +++ b/imports/ui/pages/auctions/currencyAuction.template.html @@ -20,7 +20,8 @@
{{_ "auctions.currency.crypto"}}

{{_ "auctions.currency.amount"}}
- + {{fixed balance}} KZR