Sometimes doing a simple task (like changing a text to uppercase or lowercase) can turn tedious and take away a large amount of time. Thanks to the watch property of…
How to accept only alphabets and numbers in input field in Vue.js | Example
There may be occasions when you'd want user to enter a username with valid alphabets and numbers only (alphaNumeric). You might also want to show a warning if the entered…
How to sort a list / table by columns in Vue.js. | Example
In JavaScript, there are multiple popular data manipulation libraries like lodash, underscore, buryjs, etc. However, there's a huge community who oppose the usage of such libraries, including me. I mean,…
How to highlight polygons on hover in Vue.js using Google Maps JavaScript API v3 | Example
Drawing or rendering polygons in Google Maps is doable with some effort. However, highlighting a polygon can be a bit challenging because Google doesn't provide any API to do that…
How to generate PDF from HTML and download it in Vue.js | Example
There are plenty of custom solutions, as well as libraries to help you generate PDF from HTML. eKoopman's html2pdf.js has been here for a while and is often the top…
How to convert a JSON to an Excel / CSV file and download it in Vue.js? | Example
There are multiple occasions when a user may want to export some data as a report. You can always create an excel / CSV file on the server and send…
How to move a Google Maps marker (smoothly) in JavaScript / Vue.js?
Translating a Google Maps Marker can be handful, since Google Maps API doesn't provide any option to do that. However, there are alternative ways to do that programatically. This idea…
How to take snapshot of a map using Google Maps JavaScript API (v3) in Vue.js?
Google Maps provides no option to take snapshot / screenshot of a map directly. There are a few ways, like converting the DOM elements which hold the map into a…
How to create polygons with labels using Google Maps JavaScript API in Vue.js?
Creating custom labels with Polygons has always been a challenging thing for JavaScript developers. The fact that the polygons API doesn't provide any option to show custom labels directly leave…
