webzash icon indicating copy to clipboard operation
webzash copied to clipboard

Different Calendar and Prepopulated Entry Fields

Open lantha opened this issue 7 years ago • 6 comments

  1. I have to use Nepali calendar, and I saw that it was possible with the JS date picker but it was not elaborated in some other issue. Can you please give me some hints on that one?

  2. How can I pre-populate the entry fields in entry types? eg I have 5 ledger heads to be debit and one bank account to be credit while using the receipt entry-type. While loading the Add Receipt page how can I pre-populate the entry fields according to the entry-type?

lantha avatar May 16 '18 17:05 lantha

  1. I did get the calendar working in the datepicker jQuery UI but I cannot get it to work on calculated dates on reports and such. Its still interpreting as English date. How can i get around this?
  2. solved.

Thanks.

lantha avatar May 18 '18 14:05 lantha

What changes did you make ? How are you passing the data back to webzash and how are you storing the dates in the database ?

prashants avatar May 18 '18 16:05 prashants

The problem with storing dates in the database is that the dates are not defined in the utf8_unicode_ci format. So, I am working to convert the sql files to store the date in unicode. Hopefully it works.

lantha avatar May 19 '18 04:05 lantha

One option is to not change the backend but do the date manipulation in the frontend on the fly.

Convert the dates so that Nepali Calendar <---> Gregorian Calendar <---> Database

prashants avatar May 19 '18 08:05 prashants

thank you.. i will definitely try that

lantha avatar May 19 '18 14:05 lantha

I'm using the following jQuery for displaying Nepali calendar $('#EntryDate').nepaliDatePicker({ npdMonth: true, npdYear: true, npdYearCount: 10 // Options | Number of years to show });

and this jQuery changes the BikramSambat(BS- Nepali date) to AD $('id or class').change(function(){ $('some id or class').val(BS2AD($('id or class').val())); });

But this is not working in the system even though I can select the Nepali date and then convert it to AD. Can you suggest what is wrong?

lantha avatar May 20 '18 04:05 lantha