0

i have the following code:

                        <v-text-field
                            type="text"
                            label="Impression Caps Daily"
                            v-model="impressionCapDaily"
                            :disabled="campaign.impressionCapsDynamicActive"
                            name="impression-caps-daily"
                        >
                        </v-text-field>


get impressionCapDaily() {
    return this.campaign.impressionCapDaily
}
set impressionCapDaily(items) {
    console.log((Number(items).toLocaleString()))

    this.campaign.impressionCapDaily=Number(items).toLocaleString()

}

if for example i put more than x,000 it returns Nan so for example 50000 will return Nan instead of 50,000. if I put 5000 it will be fine and turn to 5,000 I am not sure that happens

deals4us3
  • 29
  • 4
  • Does this answer your question? [How can I parse a string with a comma thousand separator to a number?](https://stackoverflow.com/questions/11665884/how-can-i-parse-a-string-with-a-comma-thousand-separator-to-a-number) – Kael Watts-Deuchar Sep 05 '21 at 13:36

0 Answers0