Skip to content

Author: admin@master

Joi Nested schema

I am trying to create nested schema in joi and it is throwing error [Error: Object schema cannot be a joi schema] How should i define nested schema in joi? Answer You could use object.keys API

how to convert numbers to million in javascript

As in image. for some values converting correctly but some of values not converting… you can see in image I want to convert numbers to million.I am using Money format function to convert numbers but i am unable to convert numbers. This is controller part.for some numbers it is converting to millions and…

Chart.js v2 – hiding grid lines

I am using Chart.js v2 to draw a simple line chart. Everything looks fine, except there are grid lines that I don’t want: The documentation for Line Chart is here: https://nnnick.github.io/Chart.js/docs-v2/#line-chart, but I can’t find anything about hiding those “Grid Lines”. How can …

hide sidebar when click anywhere in page

I have an animate sidebar which appears when user clicks on a hamburger button. Here is the structure : Actually we can open menu by clicking on #nav-toggle element and close it by clicking on this element too. I’d like to allow user to close this menu by clicking anywhere in the page. How can I do do t…

Datatables rowId starting with a number issue

According to the Datatables specs, I can add a unique ID to every row in my table: However, the same spec says that IDs cannot start with a number. staffIdin my case is a number, I tried to add some prefix to it: However, this didn’t work. Any ideas? Answer Use function-expression as a value for rowId a…