Quote:
Is it possible
Yes, a good decision? Maybe no.
Quote:
Is it posible to make the column names and then this later be recognized by a Date picker?
Changing the data type of the columns is very challenging, especially once the database is in production. Based on your traffic quality and quantity you might have to opt for one of the migration processes. You would need to add temporary columns, then move the data, then... You get the point. No? Please read this:
sql server - SQL change column datatype in production - Server Fault[
^],
Changing data type of a column in production database[
^].
If I had to do this, I would keep the column names as they are. Leave the name column for the name data and for the date picker I would create a new column with
DEFAULT
value set to
NULL
(because existing records would contain
NULL
for this, or just provide a past date). Then, if I no longer need the name column, I would first stop using it. Then, once I know that my application (or my users' apps, in case I am selling the product as a platform) is not using this column I would remove it.
The removal part is entirely up to the business requirements. Often, you would just leave the data there. But, that's up to you.
Quote:
I have tried coding the date picker via Range. It doesnt recognize much the datepicker works but still not the range recognition.
If you want to query the data between two dates, why not just rely on the good old
BETWEEN clause[
^]? In this scenario, I would create a column for the date, and then write the query that fetches the records that are between two dates.
The date picker part is confusing. It is just a JavaScript plugin, right? You can create two of these, get their input and send in the query.
Oh, and when you send this information in query make sure that your SQL queries are sanitized against
SQL Injection[
^].